I was concerned about this as well, so sealed up my bike’s frame and filled it with helium.
As a bonus, the lighter bike is faster and climbs more easily.
This only works with carbon though. Steel may be real, but you can’t float it with any of the noble gasses.
You should also be realistic about how much time, effort, and money you put into this given your time on the water. I only did it cause I’m on a ferry a couple times a year at least.