So in all honesty I would need to know how many different gym set ups there are for the school, how many students actually take gym (I know in Aus once you get to a certain year PE becomes optional) and whether any of the PE is taken outside of the school (the school I work at will take classes down to the local pool through the summer for an intensive swimming course for example).
In the US, in most schools, there’s two: one male, one female. Sometimes there are multiple locker rooms, but that’s usually in older schools that have had added facilities to accommodate expanding numbers. New, “swanky” (LOL, mine was not!) high schools have locker rooms that rival those of some universities. This isn’t considered a handicap, so retrofitting isn’t Federally funded. Many school systems in the US are already stretched to the limits funding wise. In the county I lived in, there is no way there would be funds to retrofit an already aging high school (the buildings are now pushing 40 years old, and are showing their age) that the county is starting to fight for money to replace, and replacement is likely another ten to fifteen years away.
That story is not unique.
We have massive high schools in the US, some with upwards of 2000 students. My high school was about 450, which is TINY by American standards. And it was a public, not parochial, high school.
We don’t have a national curriculum per se, so PE requirements and options vary across the board.
I would not want my daughter to be uncomfortable in a locker room because of the presence of a phenotypic male, nor would I want my son to be uncomfortable in the opposite position. I would pull my kid out of that school if he or she were forced into that situation where THEY told me “I am uncomfortable with this”. It’s not my situation - it would be up to them. I’m not that parent.
So the opposite answer is to sequester these kids in a “private” room, which won’t do them much good either.
This is the exact same objection you heard among the active duty enlisted who all showered together during basic training (I am prior enlisted, so I did it too, and I know what they meant.)
There really is no decent answer here.