TL;DR configure REPLY_ADDR4 and REPLY_ADDR6 in /etc/pihole/pihole-FTL.conf to get the reply you want.
In older versions of pi-hole, the address was stored in /etc/pihole/local.list, this file was updated by running pihole -g. The latest version of pihole overwrites this file with a file that only contains a warning (### Do not modify this file, it will be overwritten by pihole -g).
In older versions of pihole, the IPv4 and IPv6 address was also stored in /etc/pihole/setupVars.conf, this to show the pihole IP's in the webinterface. The latest version of pihole doesn't show the pihole IP's anymore in the webinterface, not really sure if the settings have also been removed from the config file...