Having sex with my ex

Every time I hav sex with my ex/baby daddy it feels like a setback to actually getting away from him but I just get in the moment and do it anyway. I know he’s gonna be in my life because we have a kid but he’s broken my trust so many times and hurt me I couldn’t stay with him. But I stay at his house and take care of the baby while he’s at work and when the babies asleep we drink a little and it just happens. Then the next day I regret it again. Ugh what do I do, anyone else been through this

-btw I don’t take care of the baby at my house(my parents house) because they have 2 big dogs that have tried to jump on him before so I like to keep him away from them until he’s older