I think you'll find the data supports chidren benefiting from a happy loving home. Not from the concern of the parents relationships with others.
My childhood friends were mostly from divorced parents and it very much impacted them all in negative ways. Parents are security blankets for children. It's who they run to when scared and need love. They are dependent on them survival. Ripping that apart causes harm.
I don't know how you'd exclude the influence of parents relationships from impacting the happiness of a home. If a kid is aware of a relationship, they're absorbing.
But I think parents sticking together for the kids is worse. Kids can see the contempt between their parents and might get the wrong impression that that's what a normal relationship looks like.
In many cases I feel the problem could have fundamentally been solved by being better at dividing household work such that someone can rest one or two days and then switch.
For many divorce seems to be a way to divide labour, which they could have done without one.
Statistically children from two parent households just do dramatically better by just about every single measurable metric, with 0 control for the quality of that household/relationship.
Another friend of mine is doing this with his wife right now. He's utterly miserable, but the racial stereotype of the missing black father weighs so heavily in his mind that he's resigned to just counting down the years (despite my own attempt to convey the above story).
At a certain age though the parents should split if it isn't working. It's definitely far easier to deal with your dad or mum leaving if you're 10 years old than if you're 1 year old