Ok, I found the problem. It wasn’t Gandi.
Turns out I was having the same issue as the guy in this thread: DNS failure on Ubuntu 22.04
BIND9 wasn’t running. I applied the fix outlined by @crazySpaniard over on the other thread, and everything started working.
Thanks to everyone who replied for your help. My issue is now solved.