This is a pointless question that at best satisfies curiosity, but at worst results in more misguided pressure to "fix" things.
Every person is different. Physical differences are obvious to us all. Clearly there are substantial mental differences too, even if they are usually not as immediately obvious from casual observation.
It should therefore not be any surprise that we can come up with various metrics to classify people into two groups, and that some occupations or disciplines are then comprised laregely of one group. Since the male/female classification covers a number of large differences, it should be expected that there are occupations and disciplines made up largely of one or the other.
What to do about this? Wrong question. The obvious presumption is that this is a natural and expected outcome, so that there is nothing wrong. The burden of proof is with someone claiming there is a problem.
We are all also individuals, and humans in particular have large individual variations that can often have a higher amplitude than broad catagories and trends. For example, let's say that in 8th grade girls on average do better at subject A than boys. This does NOT mean that any one boy will be worse at A than any one girl, only that on a broad average this will be true. This of course should not surprise anyone.
Male and female brains clearly have differences, and it should be expected that there will be subjects one is generally more adept at than the other. This is no different than discovering that those taller than 5½ feet are better at basketball than those shorter. The only difference is that the feature likely to be the cause of this outcome is obvious from casual observation. However, this again does not mean that any one person 5.6 feet tall will be better at basketball than one 5.4 feet tall, only that on average this is likely to be the case.
There is nothing wrong here as long as we don't make the mistake of judging the capabilities of individual people based on which broad catagories they fit in. The important thing to strive for is that all individuals have equal opportunities, not equal outcomes. Unequal outcomes should the expected cause of all of us having unequal abilities. Therefore trying to measure outcome, as this question is doing, is pointless and will only lead to data that is easily misinterpreted. That, in addition with the small sample size and self-selected samples makes any answer here only a anecdote at best.
I have been envolved with trying to augment science and technology education of the K-12 grade students in our town. One of the laments I have heard, predominantly from women but not exclusively so, is that there are not enough girls going into science. The fact that there are less women in science than men is somehow taken as evidence of a problem that needs to be fixed. You may think this is a pointless academic argument, but it's not since real action has been taken as a result. There are two programs I am aware of available to students in our town that aim to address this "problem". One is a take your daughter to work day, and another is a private organization that sponsor a women in science event for girls. In other words, real resources are being expended. And no, there is not a comparable take your son to work day or a men in science event for boys.
Both these programs are run by private organizations that are privately funded, so I agree they have a right to exist and carry out these programs. However, that doesn't make them a good idea or that the overall expenditure of resources is doing some larger good. Once again what we should all be striving for is equal opportunity for all, not trying to skew the opportunities to cause a more equal outcome simply because that is believed to be better somehow. It is meaningless results produced by questions like this that lead to such deliberate unequal opportunities and discrimination. Non-science like this causes real harm (I am hoping we can agree that discrimination is harm).
We all need to be vigilant and vocal against meaningless anecdotes leading to statistics, that masquerade as science, that effect public policy, that eventually cause real harm.