It begs the question why it does not happen already?
If I had to guess, I’d suggest haven’t already done what you suggest for at least one of these reasons:
1) because it’s economic mutually assured destruction
2) because tax codes are long and complicated (and sometimes deliberately written as political favours), and they’re as afraid of touching it as PayPal are of touching whatever Musk wrote 20 years ago.
3) because businesses that have revenue (Apple, $229bn) comparable to the GDP of the nations whose tax systems they are exploiting (Ireland, $293bn; Luxembourg, $59bn) is novel and governments are slow to adapt.
Private citizens don’t generally get to threaten governments by moving abroad to withold their taxes — and even when they do (I kinda am!) it’s so completely irrelevant it isn’t worth the government’s time to bother to check if it’s actually happening or just a loudmouth blowing off steam by saying they will.
On the other hand, there are countries out there that do very well out of having tax codes that wouldn't work for big industrialized countries, or countries part of a big unified trading bloc. They have strong incentives to keep their tax codes the way they are.
And if every nation agreed to have identical tax laws, we wouldn’t have a problem with lawful multinational tax minimisation in the first place, because there would be no advantage to it.