Yeah, exactly. Each country applies its own rules, there are (thankfully) no global rules for determining tax residency.
Say you are an Australian citizen having lived in Australia long term before starting this boat adventure, then with current rules, the domicile test would apply, meaning you would still have your domicile in Australia︀ and be an Australian tax resident while travelling the world on a boat (even if︁ you never set foot in Australia the rest of your life). However, with the new︂ Australian rules, coming in next year I think, you would no longer be an Australian︃ tax resident after being out of Australia for 3 years (and not visiting for more︄ than 45 days each year).
And if you have been a resident in Norway for︅ a long time before starting the boat trip, you are still a tax resident to︆ Norway for three calendar years after moving out. And unlike Australia, this is regardless of︇ what you do and where you live abroad - boat trip or just living in︈ any other country.
Beside the US, the countries of Australia and Norway are I think︉ the most difficult western countries for the boat trip scenario. For the other western countries︊ it is usually enough to cut ties / not have centre of vital or economic︋ interest there, and to a varying degree establish residency somewhere outside the country. In many︌ cases it is enough to just fill in a webform and enter an address abroad︍ - in other cases more work is needed.
And finally we have if any country︎ the boat visits may consider you as tax resident. This is much less of a️ problem than the country of previous residence I think, but sure, if you are high profile and the boat stays like 8 months in Marbella, Spain may want a big chunk of your money!