The US has the tech companies MASSIVE wealth to stop this. It is all well and good to subsidize local tech companies, but for a majority of junior/senior devs you can't compete with $250K/yr in pay from FAANG companies whose stock won't stop rising and whose name on resume basically sets you up for life (exaggerating, but its not that far from the truth for a non-US and even US developers)
Your third point doesn't make any sense to me as no country will restrict their own citizens from working for a foreign company...earning massively higher salaries than local jobs (more money earned locally is more money spent locally... all metrics that nations care about will go up). Monopolizing your citizen's attention != monopolizing their talent.
Every company you just mentioned added up doesn't even equal or come close to Google's market capitalization (Atlassian, 150B, Spotify, 55B, TSM, 550B, ASML 350B, JetBrains, private, but some say 7B?, Epic Games, 30B) and of note, TSM and ASML draw much of their valuation from hardware than software.