Well, yes. Biological sex is just a shorter way of saying what external genitalia the individual had at birth (and therefore irrelevant to a man who has his genitalia surgically altered later on).
A very few people (fewer than 2 in 10,000) are born with external genitalia that are (ambiguous or) don't match their gonads. An even smaller subset will go on to develop secondary sex characteristics that don't match their external genitalia. Of those, any that don't elect feminising treatment are entitled, in the UK, to correct their birth registration with retroactive effect.
In the UK, Khelif and Semenya would be:
Legally biologically female, but:
Entitled to correct their birth registrations to male if they want to: and
Not entitled to use women's single-sex services under Schedule 3 of the Equality Act, as a derogation from the ban on perceptive sex discrimination.
And of course any individual who's been through male puberty, as they have, can be excluded from female sports, just by writing it into the rules. There's no need for a philosophical debate, just one about safety and fairness.