That's not true. There's a 60 day grace period after your employment ends during which you still have your legal status: https://www.ecfr.gov/current/title-8/chapter-I/subchapter-B/...
https://natlawreview.com/article/notices-appear-ntas-being-i...
https://natlawreview.com/article/notices-appear-ntas-being-i...