Why not both foreign and home-grown companies investing in the US? A foreign company opening a factory doesn’t prevent American companies from doing the same.
In fact, it will probably help home grown businesses. Factories need parts, machine tools, and energy. Workers need food, housing, and services. Someone has to provide these things, and American entrepreneurs are in the best position to do so.
The economy isn’t a zero-sum game. Americans don’t lose just because a foreigner might win.
I don't assume it's zero-sum, or that this kind of foreign investment is undesirable, if you'll read my post carefully. Just that there are some comparative trade-offs.