I can think of a whole lot of reasons why a straight, married woman might be more likely to leave her job to take care of children than a straight, married man would. For example, if he’s already being paid more, then the opportunity cost of him taking time off is greater. She’s more likely to have been told all her life that her only purpose is raising children. He might have been told all his life that his only purpose is to make money. She might be on the receiving end of a great deal of social pressure to quit her job even if she wants to keep working. Etc.
So to take the entire gender gap and whittle it down to “Women love babies!” seems like a caricature. To people who, you know, live in this dimension.