Many people will have heard about the Buy Borrow Die strategy by now. In case not, it's basically where you don't sell an asset (and thus have to pay taxes on the gain). You use it as collateral for a loan and just spend the laon while the asset continues to appreciate (hopefully) faster than the interest rate. What's particularly gross about this is that many asets in many countries can be inherited by children on what's called a stepped up basis, meaning the base value for determining any capital gains taxes resets to the current market value when the owner dies. This is a massive tax break for the wealthy.
Companies have their own version of this. This has been somewhat (but not entirely) addressed in the US tax code now but it used to be that foreign corporate profits did not incur US corporate taxes as long as the money wasn't repatriated, meaning it stays overseas. But you know what you can do? That's right. Borrow money used those foreign profits as collateral and wait long enough for the US government to give you a tax holiday or to otherwise change the rules (which they did).
IMHO borrowing money against an asset should be realizing a gain and borrowing against foreign profits should be repatriating those profits.
Some will argue how you can't tax unrealized gains or it's not fair, we do it all the time. They're called property taxes.
Profit shifting is still a big problem. This is where, for example, tech companies would sell ads and services in the UK at "cost" to their Irish subsidiary, who would make all the profits. Almost nothing in UK profits where the tax rate is higher. Transfer pricing is (generally) illegal. Profit shifting isn't. What's the difference? Yes.
I think the EU and the US in particular need to start doing what I call profit apportionment, meaning if 50% of your revenue is booked in the US then 50% of your worldwide profits are taxable in the US.
You might say "they'll hide profits in subsidiaries" but really this is a solved problem already. We ahve ways of dealing with subsidiaries that are at arms length or not. We also have financial reporting to stock markets and there's really no reason tax authorities couldn't use published financial statements as a basis for taxation.