It's also that they are using a bad metric, as pay has always heavily depended on the kind of job and qualifications they require.
I bet that being a male doctor still pays more than being a female one because employers are not forced to risk-balance men and women by giving both the exact same parenthood related benefits, even if men could be working around the birth period while women clearly shouldn't.