> Living as a legal immigrant isn't as stressful as being an illegal one - but it's not too far off.
True, whether USCIS chooses to act on a sudden unexpected layoff you might have, and begin "removal proceedings" against you -- or in other words, send ICE agents to your home, arrest you, throw you in a detention center ("jail") for an indefinite amount of time, until you are put on a plane back to India (forcibly), is up in the air.
The likelihood is that, as someone who came to this country on a skilled visa, you are probably not on the top of their priority list. There is also, prosecutorial discretion. If you get laid of suddenly, and if you find another willing sponsor super-fast (in let's say, 10 days), they can basically ask USCIS for forgiveness for the fact that you were out-of-status. They'd have to write a letter explaining that the circumstances were outside your control. However, prosecutorial discretion, is completely at the discretion of the officer reviewing your case.
However, another thing to be much more wary about is, if you were let's say driving in Alabama, where police officers can stop you[1] on suspicion that you are illegal (for which the sole, if not primary criteria is race/appearance), they can and do contacted the federal government to check if you are in the country legally, and you could be dragged and chucked into an ICE detention facility by the local police.
Alabama law requires local police to do this. But I've heard of stories of police in upstate New York doing this unilaterally (not because state law directs them to). NY driver licenses show the expiration date of your visa. This person had overstayed their F-1 student visa, and the upstate NY officer after seeing the visa expiration date on the driver license, dragged him over to ICE and handed him over. What's interesting is that NY doesn't have any state law[2] that requires the police to do this. With Indian people being frequently confused for Hispanic people, you are at high risk in any rural part of this country, or really any part of the U.S. with low immigrant populations.
[1] Alabama has a statute that allows them to do that: https://en.wikipedia.org/wiki/Arizona_SB_1070 It was much harsher, as originally you would have been made guilty of criminal felony (under state law) for not having legal status, but the Supreme Court overturned most of it, except for the ability of local police to randomly stop you because of "reasonable suspicion" that you lack legal status: https://en.wikipedia.org/wiki/Arizona_v._United_States
[2] But the local laws of New York City expressly prohibits this. The local laws of the "sanctuary cities" in the U.S. all expressly prohibit the police from inquiring about your immigrant status. Even if they can know from just looking at your driver license that you are illegal, the sanctuary cities prohibit the police from taking any action based on this. More on this: https://en.wikipedia.org/wiki/Sanctuary_city