How do I get out of using bathrooms and locker rooms at school?

(Ik that my flair says closeted, but I'm trying to push myself to come out by at least summer)

My school has this stupid thing where they lock the bathrooms 10 mins after class begins and 10 mins before class ends, but this part isn't too relevant.

Anyway, my school has only boy and girl restrooms available for students to use. Not even a handicapped restroom. There is one gender neutral bathroom, but it is always locked afaik/when I've tried to use it.

The locker rooms are worse, because they are locked from the outside, and so is the gym room. So in order to get in you have to knock and go through the locker room. There's only boy and girl locker rooms as an option.

I don't really think it's fair I'd have to out myself as trans to the school (the adults, not the kids, but eventually I'm sure it'd be obvs to them, but maybe not cuz I'm a loner) just to not have to be in an open locker room and a gendered restroom, but I will if I have to.

Sorry this is getting long, but my point is, there's seemingly no other alternatives for a private way to change for gym, so is there a way I can get out of going to gym? Sadly I'm a sophomore, so I don't think I could skip the next 2 years of gym without horribly lowering my GPA or repeating the class...