I am also encountering this issue on Debian 10, but I upgraded to 5.2 from 5.1.
I am unable to change any of the DNS settings they all revert after clicking save.
I was able to set the variables in /etc/pihole/setupVars.conf, and the values show up in the WebGUI, it it does not seem to enable the behavior.
You mentioned that there was a problem with the install script for Debian, have you discovered a way to repair an installation?
No, I think I did fix it but actually not. Some point my DNS resolver didn't work over the VPN. I were quite sure that something else was broken, but after pihole clean install, everything started to work again.