I do know someone who was promoted while on maternity leave (@FANG). She absolutely deserved the promotion and has done a great job leading her (analytics, engineering adjacent) team. She subsequently went on leave for a second child (no second promotion that I’m aware of).
In my country during maternity leave the work contract is legally frozen, no change is allowed of any kind (due to a history of frauds with salaries, the government pays a big part of it so there were cases where they increased the salary 10 times for the duration of the leave). Still, nobody said anything because that target beats the law. The only thing they did not touch was the salary because this is the only thing the government is checking.
This honestly sounds pretty fishy-- like they wanted to goose their diversity stats for free while not actually changing any part of their org chart.