Cailleachina
The reason you're in a muddle is because the terms man and woman are not gender terms, they are sex terms.
A woman is an adult human female. And a man is an adult human male. Irrespective of how they want to identify their gender stereotypes.
The minor humans of these categories are girl and boy. Hence why a lot of women talk about 'women and girls'.
There are many cultures where a girl becomes a woman at the onset of menstruation. Hence pregnant woman. But, of course, here we also get pregnant girl, due to child sex abuse.
You imagining that the term woman is ring fenced in terms of pregnancy, and therefore is a gotcha, is incorrect. Girl, is also ring fenced. Because they both refer to females, just at different life stages.
You're further incorrect, in that the legislation references the word mother, not woman, not girl. Just mother. Which would apply to both women and girls.
But the weirdest thing is that you think the terms woman, man, and presumably girl and boy, are gender terms.
They're not, they are sex terms.