They just have a Visa to work at a particular company; they are not immigrating to the USA. Somebody is jerking your chain.
And if they have a kid while working here?
They are working FOR THE COMPANY. It’s up to them to decide what to do. They can cancel the Visa, and send the person home if they want. Or, they can let them stay.
But, what you suggest is the main issue with birthright citizenship. Since the person here on a Visa is a citizen of another country, the child should automatically become a citizen of THAT country (the mother’s country), not the USA.