It's interesting you asked this. There have actually been lots of questions on how to handle intersex people in sports for as long as the Olympics has been around. They used to do sex testing, but they kept (wrongly) identifying women as men due to the plethora of different human sex differences beyond the casually assumed binary. How do we handle intersex people who aren't clearly one or the other? How do we handle transgender people? 

Looking at the evidence is really the best we can do. Transgender women at least are expected to have testosterone levels within cisgender female norms for a enough time to bring their athletic performance within cisgender female norms. That is actually pretty reasonable. But even outside of transgender people, there are all sorts of outliers as far as hormone levels for all sorts of legit reasons. For some strange reason it's only an issue when transgender women are discussed though...