I feel like the technically-correct thing to say is that there are no essential differences between
genders (since you can have whatever gender identity you want) or between
sexes (because your sex doesn't
guarantee your hormonal makeup) but there
are essential differences between people of who have had long periods of differing hormonal makeup—whether natural or induced.
Which is to say, we probably shouldn't be grouping athletes by gender/sex, but rather imposing a threshold of testosterone, and having a league for people with (historic) low T and a league for people with (historic) high T.
There'd likely be an interesting opportunity in the middle for co-ed athletics leagues, where the people of both physical sexes that have "average" historic T levels (i.e. who fall on the mean of T levels of all humans) could compete fairly with one-another.
Also, as a tangent: an interesting question brought up by that, is that some athletes actually have an inherent T level that would be considered "using steroids" if a person of average T took TRT to achieve that level. Should such athletes be allowed to compete, if others aren't allowed to achieve their level? (IMHO, it's a bit like a sport where tallness is an advantage allowing people with natural gigantism, but banning people who've been given limb-lengthening surgery.)