I'd give that advice too. Specifically I was talking about the situation where people almost to a T suggest they would do anything for their kids, but that anything does not include sucking it up where their relationship is concerned.
All the stuff before one has kids, finding a partner, being the best you you can be, developing a working relationship etc is before one has kids. Or at least should be!
So it's more advice post kids upon relational difficulty, then my advice would be don't be a dick. If both parents don't be a dick then there should be a solution.
Stats wise turns out it happens a lot. People regularly report staying together for the kids and then continuing to stay together afterwards.
I respect your intentions. However, this thread has some teachable moments.
Staying together to keep up the pretenses for family, friends, and kids is called a "fantasy bond" which is the majority of marital relationships. It's toxic and dysfunctional.
“Most people have fears of intimacy and are self-protective and at the same time are terrified of being alone. Their solution to their emotional dilemma is to form a fantasy bond. This illusion of connection and closeness allows them to maintain an imagination of love and loving while preserving emotional distance”.
How Do I Know if I Have a Fantasy Bond? (psychalive.org)
The reason why it's so important for both parties to share a lifelong goal of personal development before they have kids is because they would've already learned how to overcome many of their divides and will continue to do so long into the relationship.
For example, while on date night:
"Hun, lately I have been feeling some emotional distance between us. I've finished this book, course, activity, etc., and I would for us to go through it together. It has some great suggestions that we would be able to appreciate."
I recommend "Eight Dates: Essential Conversations for a Lifetime of Love" by John Gottman to get you started.
Taking the lead in finding the right solution, and then bringing her on board through courtship, lets her know you are serious about the relationship. Demonstration beats conversation. If you have been continuously pursuing this goal, she will already know what the deal is, and it will get her working on the relationship as well. Nothing is lost if she isn't feeling your first suggestion, keep working at it.
If she isn't interested in working on the relationship, you would've been able to find out a long time before being hunkered down with commitments. Keep working on yourself, until you are ready to leave or move on to someone who wants to match your level of love, happiness, and success.
Life is too short to be living a lie. If your kids have mature, healthy, loving relationships to model after, they may not understand a divorce when they are young, but they will understand and thank you later.