In most cases, unless a parent is violent, abusive or utterly disinterested, children will do best if they have the active involvement of both parents in their lives. That doesn’t mean equal time – that works well for some children but not for others – but it does mean that the parent who is living elsewhere needs to try to remain as involved as possible. That in turn means that it is better if the parents do not live too far apart. It may be optimal also if the children can stay in the same house or at least the same school, for a while. They have enough to cope with in the separation without every aspect of their lives being turned upside down.
Giving priority to the children also means not involving them as messengers in a conflict or asking for reports on what the other parent is doing; not denigrating the other parent; not undermining the other parent’s authority, and doing everything possible to support the children’s relationship with the other parent. Children should never, under any circumstances, be used to hurt the other partner.