I'm surprised not to have seen any discussion on here about Siddartha Mukherjee's views on sex/gender. I'm a big fan of his writing and read The Gene recently (which was written in 2016 so a bit before the current debates heated up).
This 2019 article, Why Sex is Binary but Gender is Mostly a Spectrum, which is an excerpt from the book, argues that biological sex is largely determined by genetic mechanisms that produce two main reproductive categories, while gender and gender identity arise from a more complex interaction of biology, brain development, and social experience. He traces the history of sex determination genetics, and explains how genes such as SRY influence physical sex, but suggests that the brain’s response to these signals can vary, helping explain the diversity of gender identities.
Below is a quote that sums it up, although the article (and the whole book, although this is just a few pages in a much broader exploration of genetics) is worth reading.
I was just wondering if anyone more intelligent than me had read this and had any views! I get lost in the science but found it an interesting view, especially since it comes from a biologist.
"The existence of a transgender identity provides powerful evidence for this geno-developmental cascade. In an anatomical and physiological sense, sex identity is quite binary: just one gene governs sex identity, resulting in the striking anatomical and physiological dimorphism that we observe between males and females. But gender and gender identity are far from binary. Imagine a gene—call it TGY—that determines how the brain responds to SRY (or some other male hormone or signal). One child might inherit a TGY gene variant that is highly resistant to the action of SRY on the brain, resulting in a body that is anatomically male, but a brain that does not read or interpret that male signal. Such a brain might recognize itself as psychologically female; it might consider itself neither male or female, or imagine itself belonging to a third gender altogether. These men (or women) have something akin to a Swyer syndrome of identity: their chromosomal and anatomical gender is male (or female), but their chromosomal/anatomical state does not generate a synonymous signal in their brains. In rats, notably, such a syndrome can be caused by changing a single gene in the brains of female embryos or exposing embryos to a drug that blocks the signaling of “femaleness” to the brain. Female mice engineered with this altered gene or treated with this drug have all the anatomical and physiological features of femaleness, but perform the activities associated with male mice, including mounting females: these animals might be anatomically female, but they are behaviorally male."