Wireguard DNS issue with local hostnames

I have had similar problems but updated my hosts file as a workaround.
Could be related to this?