Well, at least for purposes of determining whether e.g. a culture of harsh criticism in a particular open-source project is turning away more women than men, it only matters whether it affects women more strongly than men, not why. The questions can be investigated separately.
For the latter question, cross-cultural studies would help, as would experimenting with sex hormones, looking at people of one sex with conditions that give them a hormonal balance more matching the other sex, possibly studying transgender people, etc.
For the latter question, cross-cultural studies would help, as would experimenting with sex hormones, looking at people of one sex with conditions that give them a hormonal balance more matching the other sex, possibly studying transgender people, etc.