The real issue is that since Ubuntu 18.04 the resolv.conf is sym-linked to a stub file that points to the localhost for name resolution. Localhost DNS name resolution means that the system refuses to check the supplied DNS server for .local names, believing (incorrectly) that such names are invalid. This is the default setup of /etc/resolv.conf:
delete the resolv.conf symlink
rm -f /etc/resolv.conf
create a new symlink to the “real” resolv.conf file
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf