Taxing the owners (as in a subchapter S corporation in the US). It's a pass-through. Then you don't have the incentive to do things like the double-Irish or similar unnatural acts.
That's one way of doing it, but means that if the majority of your stock is held by foreign nationals residing abroad, the U.S. gets much less income, even though the majority of the value is being generated in the U.S. using U.S. infrastructure and services.
Suggestion: create "proxy individuals"—paper people that legally own all of a foreign national's U.S. assets, including their bank accounts and their corporate interests. Then tax those proxies at all the points you'd tax regular citizens, including capital-gains time. Disallow foreign capital ownership without proper "taxability insurance backing"—i.e. seizable assets—existing in the proxy bank accounts.
That's a reasonable point, but it turns out nonresident aliens are subject to a flat 30% tax on dividends (could be lower depending on various treaties).