I say give all those girls and boys a DNA test. If the test says your male you go to the boys locker room. If it says your female you go to the girs. Pre or post op. No exceptions.
XY females with a defective testosterone receptor gene look 100% female, have overly developed breasts, never grow secondary body hair, and have slightly less IQ on average.
Telling a “girl” like this that she much use the men's locker room would certainly be a popular decision with the boys (overly developed breasts and all).