Well, you could write your congressman ;-)
Here're the laws on Customs boarding/searching/seizing: 19 USC § 1581 - Boarding vessels | LII / Legal Information Institute
The laws have been on the books for a long time. Probably before many readers here were born. And the laws really just codify what Customs has always had the power to do. Those are the rules of the road. Don't like it? Don't get on a boat. Or get the laws changed.
I would not go so far as to say "you lose ALL your rights." That's an extreme perspective. And I do deeply sympathize with people whose boats are their homes.
But the Supreme Court settled this argument 29 years ago:
"In 1790, ... the First Congress clearly authorized the suspicionless boarding of vessels by Government officers, reflecting its view that such boardings are not contrary to the Fourth Amendment, which was promulgated by the same Congress."
[United States v. Villamonte-Marquez, 462 U.S. 579 (1983)]
I hate to break it to you guys who're screaming about the 4th amendment but, the SAME congress that originally passed the 4th Amendment
to the constitution also said that government agents could board vessels without any suspicion!
It's amazing how these old arguments get rehashed over and over, usually by newly-minted ill-informed self-appointed constitutionalists, when the congress that wrote the 4th amendment settled the issue way back in 1790.
What we need is an explicit constitutional right of privacy. Do a text search of the US constitution some time for the word "privacy" and see how many times it appears (zero). The ninth and tenth amendments sorta, kinda, indirectly, give you the vague impression that there might be such a thing as a right to privacy; but in today's era -- we need something explicit. Constitutional scholars argue that since the government isn't explicitly allowed to violate your privacy, then that means you have a right to privacy (a bad case of circular logic in my opinion). But here we have it: all it takes is government legislation that grants the power to invade your privacy -- and that right dissolves into thin air. Legislation like what Congress passed, in 1790. Privacy is a very "soft" right in this county that can be easily brushed aside because it isn't explicitly granted in our constitution.
I lived in Sweden for two years (great sailing!), and studied their constitution. Sweden has a very explicit right-to-privacy, and Sweden is the "gold standard" for privacy laws today. The Europeans have recent painful memories of Big Brother snooping through people's stuff (WWII, Nazis, and Stalinists). But the neo-pseudo-conservatives in this country will have nothin' to do with none of them there Socialist privacy laws. How else are they going to ruin people's lives over what they do in their bedrooms? So, until attitudes change, we're stuck.