Try telling Panama they don't have a right to create their own tax laws. If they want to incentivize ships to register in their country, they're a sovereign nation and can do that.
At least in the northeast, it's common in the US OTR trucking industry to register the trailers in Maine. Registration fees in Maine are significantly less than in neighboring states. You'll also see a lot of recreational trailers (boats, RVs) registered in Maine.
That's an interesting way to say we should obliged to all the shitfuckery the goverments do and not look for better countries for what we want to do. Competition between goverments to end their shitfuckery would be so horrible.
The term you’re looking for is “tax avoidance”.