If you check the cameras inside and outside of the electrical room, you can figure out which locker she is in. If the camera in the room is green, she is in the left locker when entering. If it is the exterior one, she is in the right one. Sprinting in, flipping the switch, and sprinting out is usually enough to safely get away. The only problem is how often she likes to flip the breaker, at least with me.
Her speed when chasing can also be a little crazy at times. If she doesn't exit the locker at top speed then it is usually easy to get away from her.
If you don't want to do that, you can wander around the school until she leaves the room. If anything, it gives you free time to unlock the doors. She doesn't seem to talk when she is hiding in the lockers so it is usually pretty easy to tell when she is back on patrol.