Ignore any answer that says you can’t. I was a foreign student once. I followed the “laws” to a tee. Endured ABJECT poverty( no car, awful clothes, always, always, always CHEAP TERRIBLE FOOD) through my university years, thinking I was doing the right thing. Later found out every other student worked. Could be technically illegally, but did work. A Gambian girl said she worked with a fake SSN. She now works for the State of Kentucky 🙂 Other Indians I knew worked one way or the other. USCIS never tracks these. And these foreign students view USA as the land of plenty and work illegally to get rich( as compared to their home countries). I was foolish to think you follow the law of the land as both a moral and legal requirement. But democrats do not think so. Possibly neither do republicans. And USCIS never tracks these.
Go through immigration stories, you will see actually how lax they are. People forge names, docs all the time and get US citizenship or GCs.
Do whatever is convenient for you, don’t be scared. Don’t be the retard I was.
Remember America imposes such strict restrictions ONLY on f1s and H1s. They, literally, every year import a million permanent residents who come here and immediately go on welfare, when they are allowed to work in any field. That somehow they have deemed to be good for America. So…