OPT is based on legal F1 stauts.
When she stays in US but doesn't enrolled before graduation, school international center will edit SEVIS to cancel her F1, and thus OPT. Both got canceled and she is out of status (if F1 is her current status). If she is I-485 pending or has changed to another status before school cancels her F1. Then F1 cancellation really doesn't affect her legal presence because she is in fact in another status.
When she stays in US but doesn't enrolled before graduation, school international center will edit SEVIS to cancel her F1, and thus OPT. Both got canceled and she is out of status (if F1 is her current status). If she is I-485 pending or has changed to another status before school cancels her F1. Then F1 cancellation really doesn't affect her legal presence because she is in fact in another status.