I've read some takes that divorce can be positive for a child. The theory was: parents having time away from their child gave them a break, and also helped them value their time with the child more. There are also theories that living in a divorced family is better than living in an unhappily married one.
AFAIR there are studies looking at families with different cultural stances on divorce (but good luck controlling for other factors there). Also they tend to measure more easily measurable outcomes in the child than mental health, such as grades, which don't necessarily correlate.