So I guess that means the the USA wasn’t legally allowed to secede from the British Empire, then? Because that’s exactly what we did as a nation through The Declaration of Independence.
When a part of a country decides to secede, the “law” doesn’t matter. It’s an act of rebellion. What matters is what the parties to the dispute decide to do about it.