I'm aware of that. This is a case where one right is in conflict with another. There's no good answer. One group of people is going to lose and another is going to win.
The disadvantage women have is that they can't hide a pregnancy forever. Men can go to extreme lengths to hide their relationships. Although rare, it is not unheard of for a man to have two families at the same time, each one hidden from the other, and maintain this state of affairs for years before getting caught (otherwise we'd never hear about it).
The point about multiple hidden families was an example of the lengths men can go to in order to hide their relationships, not an endorsement of the practice.
The fact is, an employer has no right to know what, if any, relationships the employee has, let alone the pregnancy status of them.
The fact that employers discriminate against pregnant employees is the problem we should be addressing directly.