Do you know what stops Microsoft from building an office in, say, Czechia, hiring all the same people who were previously able to get a US work visa/green card/etc. but are now unable to, for the same labour, and paying Czech rates rather than US rates?
Nothing. Nothing, past tense, stopped them: they already have an office there.
Outsourcing is not new, yet they haven't done it to date. you cannot seriously think that visa are the only reason why they didn't to date, or do you?
Outsourcing happens but larger firms repeatedly run into the issue that management, admin, and local talent provides diminishing returns. Most of the larger US-based firms have standards that are built on decades of developed industry practices, something that can sometimes be missing from outsourced workforces on a cultural level. Hiring in domestically at least plants folks in environments where they can learn those processes over time. I suspect this is one (amongst many) reasons why US work visas are so single-employer contingent - you don't want talent you trained from the ground up to be able to easily leave for another role somewhere.