Not a solution to your current problem, but an alternative to consider depending on your network setup.
I've been running unbound as my DNS via OPNSense. Same capabilities for blocklists, plus some nice privacy benefits with DoH/DoT. I think you can use unbound with pihole too, fwiw, i just don't have a need for that.