I managed to get the passport renewed before we divorced (no small thing) but yes, after divorce I had a trip to court getting permission to allow travel to Canada where S17's grandparents live (my home country).
If you go back to court, a family law attorney may not know how things work with international travel. I learned from an attorney who practices international law that I could describe how the Hague treaty worked in regard to child abductions between Canada and the US, and offered to post bond if and when we ever traveled -- this would allow n/BPDx to cash the bond (insurance) and use it to pay for an investigation if I failed to return with our son. Meaning, I went into court and covered all the contingencies that could possibly come up. I focused on solutions to n/BPDx's fears and equally to any stonewalling he might do.
So in one of our motions we had language about that and asked for the order to state I was permitted to travel across the US-Canadian border with our son. That way I could travel with the court order instead of relying on n/BPDx to give me a notarized letter, which would likely require yet another trip to court. The judge agreed but I chose to not travel with our son because the stress wasn't worth it. n/BPDx wrote a letter to the local police in my parents hometown about their character, my character, saying my dad was an alcoholic, my mom was prone to seizures and shouldn't be driving, etc. There's so much more but you can probably imagine