The simplest way of removing this "hidden tax" on hiring women is to make the tax the same for men.
A proper policy would give equal maternal/paternal time off for both parents for either birth or adoption, and also have some sort of paid medical leave program in place for complicated pregnancies (and of course, all other medical problems).
Since a few years back there's a bonus for parents who split the leave equally, but it's going to take generations until everyone does it. (All of my peers do it, but they're university educated upper middle class that can afford it)
Anecdotally, lots of women in Italy have "difficult pregnancies" because the incentives are there for it. They're happy to have extra time off, and doctors, when in doubt, are not going to choose the riskier option.
Childbirth is not an injury. Childbirth is literally essential for society. Whatever extra profit that can be squeezed out of a new dad is meaningless next to the importance of equality and assistance to the new mother. Somehow I think our GDP will be ok.
Some recognition of the differences in experience and particularly in consequences are called for, I think. Because they exist.