Pterodactyl panel can't connect to its wing after switching from NPM (Nginx Proxy Manager) to Traefik

Update: I apparently found the solution, and it was to change my Proxmox server's DNS from Cloudflare to my Pihole DNS since I had accidentally set it to Cloudflare previously, and the DNS record was on my Pihole. When I switched from NPM to Traefik I also change the DNS from public to local so that was the problem.

Solution: Change Proxmox server's DNS to Pihole local DNS.