That's the transparency in pay that is needed.
It doesn't matter if it's male or female, only difference in pay for the same position is experience and/or education (longevity or more expertise). KNOWING the pay is equal for the same qualifications in the same position, people will know they got fair wages.
Rooting out sexism in pay takes just that transparency.