This is more true of software than of any other industry, because software is built mostly with human capital which can cross borders fairly easily.
It is exactly the opposite. Capital crosses borders much more easily than human capital. There are all kinds of impediments for human capital moving (visas, lack of money for travel, ties to families and friends). That is why, if it becomes even harder (because of travel restrictions), that tech companies will move.
If a company of 5 Indian software engineers is booted out of the US, they can get together anywhere else in the world and still develop a product to the same standard. By contrast, other workers have "stickier" skills that tie you to a specific country. An Indian aerospace engineer may find it hard to find work in India, for example.
An industry grows when it has supply and demand. There's nearly infinite demand for IT, the way I see it - everything is turning into information. The primary supply for IT is people. Immigration will increase the size of the industry and increase the number of places available for American students as well.