OPT to H1B for cap exempt employers, can you work with H1B receipt if OPT expires ?

Hi, I am currently on OPT (non-STEM). I work for a university and they are filing my H1B (cap exempt). They are not sure if I would get it within 90 days as premium processing is closed.If my OPT expires before my H1B is approved, can I continue to work in my position at the university during the transition period. If I have to stop working does that mean I also have to leave the country ?