It isn't, but go on.
.
and genitalia), their brain will become more like those of people who function as the gender they were
assigned at birth.
Sorry - I don't want to derail the thread, but I can't let this argument (conflating deleterious with neutral/healthy variation) slide. Sex is binary in mammals and almost always genetically determined (there are a few rodent species that lack a Y but otherwise have similar development). People with DSDs do not indicate additional sexes or that 'sex is a spectrum'. Moreover, it's some serious cherry-picking to apply it to sex and not other characteristics. Humans have 46 chromosomes, 5 digits per limb, are (like other primates) visually oriented, have a well-developed pre-frontal cortex, etc. However, there are pathogenic mutations (or accidents) that can alter any of these (or virtually any) characteristics in an individual.
Bottom line: If a person is fertile at any point in their life, it's because they are able to produce oocytes or sperm. If not, they are not relevant to a definition of sex.
Here's a definition I use:
Sex is a biological concept. Asexual reproduction (cloning) is routine in microorganisms and some plants, but most vertebrates and all mammals have 2 distinct sexes. Even single-cell organisms have “mating types” to facilitate sexual reproduction. Only cells belonging to different mating types can fuse together to reproduce sexually (2, 3). Sexual reproduction allows for exchange of genetic information and promotes genetic diversity. The classical biological definition of the 2 sexes is that females have ovaries and make larger female gametes (eggs), whereas males have testes and make smaller male gametes (sperm); the 2 gametes fertilize to form the zygote, which has the potential to become a new individual. The advantage of this simple definition is first that it can be applied universally to any species of sexually reproducing organism. Second, it is a bedrock concept of evolution, because selection of traits may differ in the 2 sexes. Thirdly, the definition can be extended to the ovaries and testes, and in this way the categories—female and male—can be applied also to individuals who have gonads but do not make gametes.
Note that there are a lot of differences between the two mammalian gamete types besides size (e.g. many features of chromatin organization and epigenetic marks).
Also
sex is
observed at birth - Yes, there are awful cases of those with DSDs getting incorrectly characterized, but that's not what this thread is about (or what trans issues are about). I'm not aware of 'gender' being formally assigned, but one could argue that that it's the socialization according to sex-specific stereotypes (which I'd like to see eliminated).
That being said, in non-monogamous mammalian species you'd expect to see greater sexual dimorphism in behavior (given that mammalian females bear nearly all of the reproductive costs) and there's data to support that. I did some research that bore on this- I can go back and find refs if there is interest.