I once saw a brilliant solution to that--of course, it means putting the kids before ego, and having some disposable income.
Seems the parents rented an apartment, and shared it--one parent one week, the other parent the next--while the children stayed in the family home. As dreadful as divorce is for kids, at least they weren't being shopped from house to house.
I couldn't bear living one week in one place and another week in another place especially if my two landlords were fighting. So I cannnot imagine how a child does it.