This seems virtually impossible to enforce. It's trivial to restructure hiring a developer to write software, as licensing software from a foreign development firm, or any number of other workarounds.
This is not just a hypothetical, this is something that already happens when companies are looking to optimize their tax burden. Corporate structuring and income shifting are big businesses in their own right and serve to find the minimum amount of changes required to be able to legally reclassify income.
In the case of this bill specifically, in the unlikely even it passes, a simple corporate inversion will solve this problem. Instead of the US company owning foreign subsidiaries, the structure is inverted: the parent company becomes foreign, which will own a domestic US corporation. When the multinational wants to hire or retain offshore talent, it simply pays out from the parent company. Again these aren't hypotheticals, these are real tax avoidance strategies that are already in place and are well-trodden paths.
You can come up with an infinite amount of regulation to try to halt this (this problem is also called tax base erosion) but it ends up doing more harm than good - eventually you end up with a tax code and regulatory environment so complex that that alone disincentivizes new investment.
The goal is not just to retain existing capital and talent by forcing them to be locked in - it's to compete for the next dollar, the next startup, the next factory - new investment will follow the path of least resistance, while older companies eventually close up shop due to one reason or another.
If your worldview is one of "We already have the best capital and talent, so we don't need to bother to compete to acquire new capital and talent", the world you live in will stagnate and wither with respect to societies that will bend over backwards for this.