Sorry it didn’t fctor in your case, thats not always how it goes. Some judges recognize thats bad for the kids and don’t rule that way.
But family court is severely inherently biased towrds men to begin with, so unless you get a judge that views and knows thats a real danger to kids, especially girls, the normal anti-male bias the court generally has will prevail.
Family court bias varies by state, by judge and by legal fads of the moment. In my state when it was my turn, they favored men (which I am not one). Right now, greedy wicked women are destroying the lives of their exes and children in the Baltimore-Washington-Northern Virginia area.
And it’s certainly no better for boys to watch their parent dump their other parent and put on a show of being a ho or a horndog.