It will be systemd-resolved causing the issue. Please see: GitHub - pi-hole/docker-pi-hole: Pi-hole in a docker container
systemd-resolved