Gender pay gap is measured for the same jobs, categories and pay level. that means that engineers are compared with engineers, while nurses, with nurses. It is measured by sectors, lower in feminized sectors, higher in sectors like technology. My suggestion, when you look at the studies, read the part about "methodology" where they explain things like this.
Of course you also have "conditioned choices", which means that people would choose among the options that would be available to them. So people who get a headstart, would have better opportunities later. That means that is boys are offered certain curses and encourages on one direction, it would be easier for them to get some opportunities. Sure, you can go against the tide, but it would take you more effort and have a higher cost for you.
But when wages aren't public it might be very difficult to prove at a court that you are paid less. I mean, technically people can talk about their wages, but HR is the only ones with access to the full information. And if you obtain the data in ways that are not legal, that data won't be considered in court. So you can suspect that you are paid less, but don't want to "rock the boat" with a lawsuit that might get you unemployed and, worse, unemployable later. And lawsuits are expensive. Going against a big company even more. So people with families and mortgages won't sue, not because it is not happening, but because justice is unreliable.
And even with that obstacles there have been lawsuits like the one in google:
https://www.business-standard.com/article/international/10-800-women-suing-google-over-gender-pay-disparity-win-class-action-status-121052800121_1.html#:~:text=In%20February%2C%20Google%20agreed%20to,The%20case%20is%20Ellis%20v.
Now tell me, why do you think that the company, who is the one with access to the data decided to settle? I mean, if they weren't discriminating, they have the data to prove it. But chances are that the payroll data proves that pay gap, so it was cheaper to just settle. And those were high paying jobs, the women there didn't choose low paying jobs...
So please, can you offer the data to support your claim that women choose low paying jobs? Or the studies that support your assertion.