Yeah, I've never been particularly committed to whether or not brains differ by sex either way, so I don't have a huge horse in this race, but I will say that people that are very committed to biological sex differences in brains seem way too cavilier in how they dismiss the idea that these differences in brains might be the result of living as a certain assigned gender, instead of being differences that were there since birth, considering that we know that the brain changes and adapts fairly drastically to consistent habits and modes of living and so on, due to neuroplasticity. We see this sort of dismissive attitude in the very responses to you, which essentially dismiss your concerns with there being confounding factors out of hand for, in most cases, very poorly argued reasons, mostly to do with the fact that they want to draw a quicker conclusions and don't want to be careful, and so are fine with ignoring a possible confounder in the data that is being analyzed.

The only really good arguments against sex differences in brains being a result of socialization are the David Reimer case proving the gender identity isn't mutable, which might indicate ingrained sex differences in brains as an explanation for that immutability, and studies on trans brains (which tend to align more with the average brains of their desired gender), which is why I'm ambivalent.

On the other hand, the largest meta-analysis regarding sex differences in brains ever performed, using every study on the subject from the past 30 years, failed to find robust sex differences in brains: https://www.sciencedirect.com/science/article/pii/S014976342...

> Abstract: With the explosion of neuroimaging, differences between male and female brains have been exhaustively analyzed. Here we synthesize three decades of human MRI and postmortem data, emphasizing meta-analyses and other large studies, which collectively reveal few reliable sex/gender differences and a history of unreplicated claims. Males’ brains are larger than females’ from birth, stabilizing around 11 % in adults. This size difference accounts for other reproducible findings: higher white/gray matter ratio, intra- versus interhemispheric connectivity, and regional cortical and subcortical volumes in males. But when structural and lateralization differences are present independent of size, sex/gender explains only about 1% of total variance. Connectome differences and multivariate sex/gender prediction are largely based on brain size, and perform poorly across diverse populations. Task-based fMRI has especially failed to find reproducible activation differences between men and women in verbal, spatial or emotion processing due to high rates of false discovery. Overall, male/female brain differences appear trivial and population-specific. The human brain is not “sexually dimorphic.”

I was unable to read the particular methodology and findings of the article for this threat because I can't find it on scihub, and don't have institutional access to through my university, but I suspect that it would fall the foul of the exact sort of problems the above quote is talking about: that the differences it is finding aren't consistent across different populations, or can be more explained by brain size than anything else, and that's what it's picking up on, or something to that effect. In any case I'm more inclined to trust the gigantic meta-analysis than I am an individual study on a subject like this one where failures to replicate and spurious correlations are fairly common.