The perfect opportunity? I don't see how. We're talking about someone who has decided to assault a fellow schoolmate who probably knows who they are, in a confined area with many adults close by, without fear of the likely consequences. This would either need to happen between classes, when there would usually be several other students in the restroom, or during class, when (if the school is doing its job) you've been excused from class and can't exactly be hanging around the restroom for a long time waiting for a specific person to walk in by herself.
At worst it's an alternate opportunity, but I don't see why someone who is determined to rape a fellow student would choose a bathroom. Someone with that kind of determination to rape and that kind of disregard for consequences probably isn't just waiting for access to women's restrooms to do it. I'm sure there is a greater than 0.000000% chance of this happening, and I'm sure it will be HUGE news when it does, but there are hundreds of other situations where women are at greater risk of abuse.