I had the very same problem: all devices in the network including the raspberry pi itself could use the pihole as the new DNS server... except inside the other containers running on the raspberry pi.
Your solution - using the local IP address of the raspberry pi - worked! I don't know how you manage to find that .
Thank you very much!