Back when our kids were little, it was a much bigger problem for my wife than for me. I found women are treated much worse with regards to a lot of little kids than men. Any person who made a comment to me was typically a good friend at work, and it was almost always the same: “Don’t you know who causes that”, and always said in jest and always accompanied by a sincere congratulations. I had a standard reply: “We do, we happen to find it a lot of fun, you and your wife should try it sometime”. My wife had it much worse. The comments were not just said in jest, not just by friends, and much more biting, and always from other women. A few times I was present and was actually shocked at the tone and the way she was treated. More than once I stepped into the conversation and told someone to mind their own business. This really made matters worse in my wife’s mind, as she felt it made her look like it was all my doing and she was just a weak wife who was in her present state because she wasn’t strong enough to stand up for herself. So I quite doing this and learned to bite my tongue. My wife would typically turn and walk away. But when it came from someone she was close to, it would literally drive her to tears at times.
Wish I had better advice.
ETA: I will say this: “This too shall pass”. I can think of more than a couple of women, good friends or family, who were very mean to my wife when she was pregnant, and now that the family is mostly grown they love to rave about how wonderful our family is. They were never bad people, just women who had been brainwashed by the 70s/80s feminist movement. A stay at home mom with a lot of kids was an traitor in their mind, especialy as my wife was well educated and had quit a successful professional career to be a wonderful mother.