I am studying education currently, and we have been asked to explain the areas of our high school history classes we feel have failed us. While writing my essay this evening, I remembered when my teacher at the time (a White, 30-something pregnant woman) was talking about Hamilton's financial plans and how they are still destroying the country today. One of my classmates asked something about the wage gap between men and women, and my teacher looked at all fifteen of us and said, "Well, when you factor in paid maternity leave, there is no wage gap." I have thought about that every single day for four years. When I took AP Microeconomics the following year, I asked my teacher if what my history teacher had said was true, and he refused to give a straight answer, saying more about the experience and what degrees employees have upon hiring. I really believe that maternity leave does not "fix" the wage gap for a lot of reasons, but no one I have asked has given me an explanation.
Similar to the response of your AP Micro teacher -- part (potentially a large part) of the gender wage gap can be accounted for by the differences in the fields and positions that working men and women hold in the workforce. This study < https://www.payscale.com/data/gender-pay-gap> cites that in 2020, women earned 0.81 cents for every dollar earned by a man. When controlling for the type of work of women were doing, their fields and their titles, women earned $0.98 cents for every dollar a man made.
Given the results of this study, one of the lingering questions one might have is why men are disproportionately represented in higher paying positions and/or professions than women? Some cite a "leaky pipeline" -- women advancing in male dominated fields fall out of the workforce at higher rates than men. Potentially due to institutional reasons (discrimination, lack of senior female role models/mentors, etc.), gender differences (some studies suggest women have less confidence than their male counterparts and may be less likely to negotiate their salaries, etc.) and societal pressure/norms (men work outside of the home and women work in the home).
In response to your question regarding paid maternity leave -- paid maternity leave is fairly uncommon for working mothers in the United States. According to the BLS, in 2018, only 17% of U.S. workers had access to paid leave. In contrast, 89% of workers had access to unpaid leave <https://www.bls.gov/opub/ted/2019/access-to-paid-and-unpaid-family-leave-in-2018.htm>.
In the U.S. -- one in four women return to work two weeks after delivery. The average length of paid and unpaid leave (combined!) is 10 weeks. <https://www.newamerica.org/better-life-lab/reports/paid-family-leave-how-much-time-enough/a-timeline-of-paid-family-leave/#:~:text=10%20weeks,take%20in%20the%20United%20States.> In short, it is not uncommon (in the U.S.) for new mothers to take unpaid time off following childbirth. Most do not have access to paid time off and even those who do, supplement that time off with unpaid time off. Given that the rate of access to paid leave is so low (less than one in five workers!), it seems unlikely that paid maternity can justify the entirety of the gender-wage gap.
It should also be noted that men also have access to disability leave surrounding medical events (surgeries, etc.)-- childbirth often falls into this same category of leave and having a baby is certainly a physical event and sometimes does result in a surgery. If women were to make less money for having access to the same leave that men also have access to, shouldn't men be paid less for having access to this type of leave too?