I also just realized that Sex appears to be identified as Gender in the FamilySearch interface and comes across as such and in the person profile you also refer to it as Gender. It is unfortunate but FamilySearch should refer to Sex as Sex and not Gender in the API, particularly since when editing the vitals for a person there it is labelled as such.
While historically Sex and Gender were considered the same thing it seems these days to be more widely accepted, at least in the social sciences, that they are two different concepts with Sex normally referring to the biological aspect and Gender to the social role or sexual orientation. In that vein as well I know FamilySearch only has categories for Male, Female, and Unknown and they are missing the Intersex label for those with mixed characteristics, admittedly a very small percent of the population, which is unfortunate.
It’s interesting when you think about large family trees where sometimes an early record for a child indicates one sex and later records another that they may have actually been Intersex. I think I have two of those cases in my tree and if memory serves right in neither case did the person marry, and that may well have had something to do with it although that is just speculation.
Anyway, I wanted to point all this out as it is something a majority of us don’t typically think about. I know FamilySearch is working on adding support for same sex relationships so maybe they will fix that too at the same time if any of them have given it any thought.