I don’t know the best answer, but here’s my two cents.
That disloyalty is just going to grow and you’re going to become increasingly unhappy in your relationship, which will probably impact the kind of role model you‘ll be for your kid. You don’t want to set the expectation that this is what a healthy relationship looks like. So to a degree, you have to prioritise your own happiness in order to be the best role model/provider for your kid.
I think you can still be visibly amicable with the mother, and still be a great father, whilst also being separated.
I imagine your kid growing up and being told “oh your mother and me haven’t loved each other for years” - it might skew their perception of you forever. They don’t know if you’ve ever really been happy, and they don’t know what a healthy relationship looks like now.
I could be wrong; this is just how I feel instinctively.