That's not how the system works, though. Digital ads in foreign markets are foreign income, which means that there are not domestic benefits. When Google sells an ad in Saudi Arabia, that ad revenue goes to Google's local company and only benefits Google. Even though they're an American company, that revenue is not taxed or repatriated in any way.
There's a current SCOTUS case about this exact question and it looks likely that it will be decided in favor of these companies to repatriate their revenue without paying a single penny in taxes. In other words: they racked up hundreds of billions in revenue and just held it overseas until they can claw it back without paying their fair share.