That Bible passage refers to a woman who lied about being the mom; not to a mom-dad dispute.
The subject of the Bible was the child. Children deserve to grow up in a stable home with both parents. If the parents won’t cooperate the child still deserves their stability rather than being shuffled between two places.