depends on the situation as not all breaking down of relationships are hostile some people get along fine but grow apart as husband and wife.
in that case if all sides are happy why not stay together for the kids, it would be the same as living with other friends or family if you parted.
but if there is any hostility , violence, arguements for the sake of the kids i reckon get out