It comes down to why someone was hoping to sort people by sex in the first place.
Indeed, that IS the issue: what are the objectives, and what are the criteria that we'll use to design our go/no-go gauges to do that sorting?
Apropos of which and of the thread topic ..., I see something from your neck of the woods -- if I'm not mistaken -- about the Oklahoma Council of Public Affairs [OCPA] which has weighed-in with a more or less credible set of definitions:
The legislation defines “female” throughout Oklahoma statutes to mean “a natural person whose biological reproductive system is developed to produce ova,” and defines “male” to mean “a natural person whose biological reproductive system is developed to fertilize the ova of a female.” The bill also defines “sex” to refer to “a natural person’s biological sex at birth.”
https://www.ocpathink.org/post/oklahoma-lawmakers-approve-bill-declaring-woman-means-woman
Though it reminds me of various "perverse incentives", a classic one of which was French policy in Indochina to offer bounties for rats, the consequence of which led to the farming of rats:
https://en.wikipedia.org/wiki/Perverse_incentive
More particularly, one might reasonably wonder whether that law would grant personhood to cattle, chickens, and pigs -- opens them up to charges of genocide ...
More problematically, while it is maybe great that the OCPA has more or less decoupled their definitions for "male" & "female" from actually having to have functional gonads -- presumably echoing Hilton's "past, present, or future functionality" -- the fact of the matter is that such definitions conflict rather badly with the strict biological definitions. They might have had more justification in defining "woman" and "man" with those phrases, qualifying them with "adult", and creating separate categories for "girl" and "boy" while qualify them with "juvenile".
But as a further complication, one might reasonably argue that there is some 1% of the population who don't actually have a "reproductive system developed" to produce either sperm or ova.
Bit of a sticky wicket to create definitions that are scientifically accurate and that don't create more problems than they are designed to solve -- self-identification being the "paradigmatic" case of that. Somewhat apropos of which, you might be interested in this supposedly classic legal case from the UK -- one that transwoman Debbie Hayton quoted some years ago:
The law should adopt the chromosomal, gonadal and genital tests. If all three are congruent, that should determine a person’s sex for the purpose of marriage.
https://swarb.co.uk/corbett-v-corbett-otherwise-ashley-fd-1-feb-1970/
Bravely spoken though they seemed to have been rather "light" on the details of how specify that "congruence".
Some reason to argue -- as at least I and Griffiths have done -- that "sex" per se is simply the wrong tool for the gatekeeping jobs that society is trying to press it into doing. In consequence, there might be some additional reasons to argue that we should simply define "woman" as "adult human vagina-haver" and "man" as "adult human penis-haver".
They knew, of course, which juveniles were female and which were male, just as mammal breeders do on Earth today.
Which juveniles
probably are or will become male & female ...
ETA: Unrelated to the above but entirely on topic here, Hemant Mehta is punching up at Richard Dawkins again...
https://twitter.com/SwipeWright/status/1638028371291430915
Tough job, someone has to do it ...
But not really impressed with either Mehta, Dawkins, or Wright. None of them seem to have a clue that the definitions for the sexes are a matter of stipulation, and not of gospel truth. Mehta may actually have a bit of a point in more or less agreeing -- apparently or in effect -- with that premise, but he seems clueless that there's a great deal of reason for the biological definitions. Whereas Dawkins hasn't, as far as I've seen, tendered any definitions of his own -- just a bit of hand-waving and gesturing hypnotically. And Wright is, of course, in there like a dirty shirt with the "Heying-Hilton-Wright Hypothesis" while being reluctant to consider how those definitions make the sexes into spectra.
A rather unedifying spectacle that is turning much of biology into a clown show.