Are you sure about setting that to empty?
Your debug log also shows domain=---.internal
in a custom /etc/dnsmasq.d/00-search-domain.conf
.
Pi-hole v6 won't read /etc/dnsmasq.d
anymore, unless instructed to do so, see Custom dnsmasq configs not loading, i.e. your system would have used lan
with v6 where it had used ---.internal
with v5.
As Pi-hole v6 exposes that option, using --config dns.domain
is the v6 way to apply that config.