Pi-Hole is unable to resolve name (Ubuntu 18.04)

I found the crucial moment, putting 'ping's before and after every single step.

The mysterious problem is happening when "Disabling systemd-resolved DNSStubListener and restarting systemd-resolved"

See this link to my fork: This is the moment... before I can resolve name, just at the end of this phase, I cannot no more resolve name.

https://github.com/realtebo/pi-hole/blob/test_install/automated%20install/basic-install.sh#L2470-L2482

This is the debug output, sorry for strange format, is captured

"[i] Ping 2", "", "PING google.it (216.58.205.99) 56(84) bytes of data.", "64 bytes from mil04s26-in-f3.1e100.net (216.58.205.99): icmp_seq=1 ttl=54 time=12.1 ms ",

"--- google.it ping statistics ---", "1 packets transmitted, 1 received, 0% packet loss, time 0ms", 

"rtt min/avg/max/mdev = 12.175/12.175/12.175/0.000 ms", 

"[i] Testing if systemd-resolved is enabled  ", 

"[i] Testing if systemd-resolved DNSStub-Listener is active", 

"[✓] Disabling systemd-resolved DNSStubListener and restarting systemd-resolved", 

"[i] Ping 3", "", "ping: google.it: Errore temporaneo nella risoluzione del nome"