Every employer is different of course but I would be hesitant to lay off an employee whose visa I paid for.
Now there can be a snide comment about how the visa workers are likely "better bang for the buck" for the company, and the company may have a hard time arguing they need more visas next year if they just laid non-visa workers off.