DNS doesn't work for machines in lan while wireguard works fine

Check that line doesnt return after a reboot!
Post results for below ones run on Pi-hole , and on one of your clients in a cmd prompt (Windows/Linux/MacOS):

nslookup pi.hole

nslookup pi.hole 192.168.1.12

EDIT: ow and check if your router doesnt have some kind fo rebind protection or similar:

EDIT2: also check if firewall is blocking on Pi-hole:

pi@ph5:~ $ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination