This doesn't seem invalid? If for example 'wanting to spend more time at home'/'cares about team fit more than salary' is a predictor of gender, that doesn't mean it shouldn't be excluded from analysis.
What we care about is whether the pay difference is because of people treating women unfairly. If a different trait causes lower salaries in both men and women, but is more common among women, the problem is not a gender pay gap.
For example suppose women on average don't care about money as much as men do, and take jobs with different benefits (like more free time). In such a situation, you would observe a gender pay gap. But the pay gap wouldn't be bad, or something that we need to fix. It would just be a difference in preferences, and a woman who does care about money as much as an average man could expect to earn as much as a man.
The article itself talks about how a significant part of the gender pay gap is the higher willingness/better fit of men to take dangerous, difficult, but well paid jobs in natural resource extraction. This... sounds like not a problem to me?