It sounds like you've probably put up with shite for years. Men don't respect you more because you tolerate them being crap. They certainly don't love you more.
Oh there's no other girls on the scene...because your pregnant? Is that how low the bar is? That if you were not pregnant it would be OK for him to do it?
(What happened to you?! How has it come to you hating yourself so much that you would stay with someone who actively flirts with other women?! )
Some men are awful. They are not worth your time. Like this guy.
But you need to take some responsibility for what you put up with too, love.
When men are decent and worth keeping -you should still hold them to the same standard of accountability for their actions as you hold yourself to. If you wouldn't do something in a relationship, like, talk to other blokes -nor.should.they.
He has demonstrated again that he doesn't respect you.
Men are not children. We should not infantalise them or make ridiclious excuses for any shitty behaviour.
He has done you a favour by leaving. Otherwise, how much longer we're you going to date this utter loser? When were you going to step up and protect yourself? Ever?
Focus on you and your baby now. And learn your worth and practice loving yourself and developing healthy boundaries. Only then will your child grow up not to date loses men like her father. Or to become one.