He hasn't said he doesn't want a girl, he said he wanted a boy because he was worried about his daughters reaction. Prior to that he even said he wanted a girl.
You have a man who has lost a son, and is now expecting (I use that in the anticipatory use of the word not genuinely expecting as in pregnant) another child.
He probably felt like he couldn't 'want' another boy because it would feel like he was saying he wanted to replace his first son. Having a child after losing one is full of complex emotions, some of which he may not have processed or fully articulated.
So he feels like he can't say he wants a boy. Meanwhile he's legitimately concerned about his daughters reaction to another baby, which is common in families, but particularly in blended families where he is probably concerned around the fact that his current daughter probably only sees him part time and a new baby will see him full time. Rightly or wrongly he may believe that if the new baby is a boy his daughter will feel less replaced.
He seems genuinely concerned about his current daughter and the OP gives no indication he is a bad father to her so I'm not sure why we should jump to the conclusion that he doesn't want girls/he's a bad father to girls.
In fact it's perfectly normal to hear people articulate they want a boy or a girl and not something that normally causes a breakup.
It was a drunken perhaps insensitive comment from a man who has been through a traumatic loss who is probably worried that no matter which sex the baby he is going to be left with feelings of guilt that the new baby is replacing one child or another, whilst worrying about his daughters reaction to a new baby.
What he actually needs (in the absence of the OP telling us he is in fact an arse) is a neutral third party to talk to work through his emotions and concerns. Not for his pregnant partner to leave him because he admits it might be easier for his daughter if they have a son.