Labor really is not fungible that way. On shore H1B Indians generally are higher skilled than offshore Indians, perform different roles at companies, and are paid more. Many of them could have chosen different careers than Tech and likely will if they move back to India.
Or: instead of talented software engineers around the world being drawn to the US, they stay home and build deep talent pools in their home country or in the next non-US SV. In the long run the onshore/offshore becomes less and less about quality and cost tradeoffs.
We're giving away our long term dominance of tech for xenophobia and the possibility of short term job growth
It's not xenophobia anymore--when major percentages of US grads, of all ethnicities, can't find jobs, there is a fundamentally larger issue at stake here.
Why not just move US H1Bs back to India and keep paying them US wages? They will be filthy rich in India, their living standards will literally skyrocket. They will be highly unlikely to leave. And keep them on same roles as they did in US.
The leadership in a GCC are all ex-US EMs, PMs, PMMs, and FP&As who are given the option to take a haircut on their US salary and build a hiring pipeline within India while meeting the company's hiring requirements.
Tech salaries in India have already converged with much of the EU, especially for top talent.