Failed to resolve via localhost (127.0.0.1)

Looks like that did the trick!
If the file SoftAp0 is interfering constantly with Pihole, delete it and tell the system not to generate it again.
Delete it:

sudo rm /etc/dnsmasq.d/SoftAp0

And don't generate it again just commenting this line:

wfile="/etc/dnsmasq.d/SoftAp0"

inside this file:

/opt/scripts/boot/am335x_evm.sh

Thank you very much for your help. I really appreciate you experts helping. Thank you very much!