Since my last post I went back over the decision in the Semenya case that the Court of Arbitration for Sports released in 2019. The only reason the CAS upheld the DSD regulations (first set forth in 2018) that you have accurately quoted is that IAAF/World Athletics said in the court proceedings that the DSD regs apply only to athletes who are 46,XY. The CAS panel found that if the regulations apply only to athletes with certain 46,XY DSDs that cause them to be "androgenized" (& thus to have male sports advantage), then they are legitimate & lawful.
From the executive summary of the decision:
6. During the course of the proceedings before the CAS, the IAAF explained that, following an amendment to the DSD Regulations, the DSD covered by the Regulations are limited to “46 XY DSD” – i.e. conditions where the affected individual has XY chromosomes. Accordingly, no individuals with XX chromosomes are subjected to any restrictions or eligibility conditions under the DSD Regulations.
7. Athletes with 46 XY DSD have testosterone levels well into the male range. The DSD Regulations require athletes with 46 XY DSD who have a natural testosterone level of above 5 nmol/L, and who experience a “material androgenizing effect” from that enhanced testosterone level, to reduce their natural testosterone level to within the normal female range (i.e. to a level below 5 nmol/L) and to maintain that reduced level for a continuous period of at least six months in order to be eligible to compete in a Restricted Event at an International Competition. There is no requirement for, or suggestion of, anysurgical intervention to achieve this level.
The CAS found that the DSDs regulations are discriminatory on the surface because they target a specific group of athletes competing in women's sports with particular natural physical characteristics - "namely a 46 XY DSD coupled with a material androgenising effect arising from that condition" - and the regulations don't apply to other athletes who don't have those same characteristics. Note, however, that in deciding whether this was sex discrimination, the CAS panel used athletes of the male sex without DSDs as the comparator - not athletes of the female sex either with or without DSDs:
14. The Panel unanimously concludes that the DSD Regulations are prima facie discriminatory since they impose differential treatment based on protected characteristics. In particular, since the DSD Regulations establish restrictions that are targeted at a subset of the female/intersex athlete population, and do not impose any equivalent restrictions on male athletes, it follows that the Regulations are prima facie discriminatory on grounds of legal sex. Similarly, the DSD Regulations create restrictions that are targeted at a group of individuals who have certain immutable biological characteristics (namely a 46 XY DSD coupled with a material androgenising effect arising from that condition), and which do not apply to individuals who do not have those characteristics. It follows that the Regulations are also prima facie discriminatory on grounds of innate biological characteristics.
However, the majority of the CAS panel agreed that regs which discriminate against 46, XY DSD athletes in women's sports are justified & legitimate to preserve fairness in women's sport for the athletes of the the female sex:
22. The IAAF submitted that all but one of the many different factors that contribute to sport performance - including training, coaching, nutrition and medical support, as well as many genetic variations - are equally available to men and women. The only factor that is available only to men is exposure to adult male testosterone levels. The IAAF submitted that if the purpose of the female category is to prevent athletes who lack that testosterone-derived advantage from having to compete against athletes who possess that testosterone-derived advantage, then it is necessarily “category defeating” to permit any individuals who possess that testosterone-derived advantage to compete in that category. The majority of the Panel accepts the logic of the IAAF’s submission.
23. Having carefully considered the expert evidence, the majority of the Panel concludes that androgen sensitive female athletes with 46 XY DSD enjoy a significant performance advantage over other female athletes without such DSD, and that this advantage is attributable to their exposure to levels of circulating testosterone in the normal adult male range, rather than the normal adult female range. The majority of the Panel observes that the evidence concerning the performances and statistical over-representation of female athletes with 46 XY DSD in certain Relevant Events demonstrates that the elevated testosterone levels that such athletes possess creates a significant and often determinative performance advantage over other female athletes who do not have a 46 XY DSD condition.
24. On this basis, the majority of the Panel accepts that the IAAF has discharged its burden of establishing that regulations governing the ability of female athletes with 46XY DSD to participate in certain events are necessary to maintain fair competition in female athletics by ensuring that female athletes who do not enjoy the significant performance advantage caused by exposure to levels of circulating testosterone in the adult male range do not have to compete against female athletes who do enjoy that performance advantage.
https://www.tas-cas.org/fileadmin/user_upload/CAS_Executive_Summary__5794_.pdf