I to use Unifi products, including the Dream Machine Pro and do not experience this problem. Four different VLAN's and everything works as intended. I also have Pi-Hole running in UnRaid docker container, but do not have any custom DNS records for it.
What is under the "Details" section of the error page that you have there?