I don't think we need to be too condemnatory.
Caster Semenya appeared to be female at birth.
This is a condition with varied presentation depending on the genes.
Some with the condition will spend their whole life as women.
In some countries the majority will lives as women.
In others the majority as men.
There is no wrongdoing per se.
Caster Semenya lacks DHT to some degree. DHT is a potent androgen, more potent than testosterone in its androgenizing effect. While it's not considered anabolic, it's perfectly reasonable for Caster Semenya to argue the toss on this point, given that Caster Semenya does not have normal male biology.
'Playing with boys and wearing trousers' doesn't make you a man.
Having testes doesn't either, in all cases. Someone with testes but a completely non-functioning androgen receptor is very feminine and is for reasonable purposes a woman in that they have breasts and haven't experienced the effects of testosterone in their brain and are likely to perceive themselves as female. It isn't a trump card to say 'they are biologically male'. We do have to deeper than that.
Many people with Caster Semenya's condition perceive themselves as female.
It isn't really on for us to say 'Caster Semenya is a man', because Caster Semenya does not have normal male biology and had none of
an important male hormone before birth, and a low amount now. This is something to be argued in court, it isn't really possible to prove that people with CS' condition are on the whole competitive with men. They might or might not be. It seems fairly obvious that they have an advantage over women, but clearly a DSD doesn't allow us to just say 'this is a man, it's so obvious'.
However, having this been argued in court, Caster Semenya lost, and reasonably so.