I should have mentioned it's advice from lived experience. I should also mention that you will face a lot of public and familial censure for it, so you'll have to be strong enough to stand up to that.
But.
Your kid will be stronger for it. Less likely to chase after love that her father denied her and end up pregnant. You'll have a closer, sound relationship with her because it won't.be sullied with what amounts to be gaslighting. He'll be more likely to get his head iut of his ass once he realizes you're not going to chase after him or make excuses for him. Or he'll fade away, leaving room for someone who actually wants to be a Dad, or at least a better opportunity for a better partner and parent.
From men, particularly older men, you'll hear a lot of "I feel sorry for your kid for having a mother who would deprive her of her father" type comments. These comments just show how much men expect the women in their lives to manage all their relationships for them regardless of how they act. Because you're not keeping him from her, you're just not doing fall the work for him, especially when he sabotages and undermines that work you every step of the way anyway.