I think i may be facing similar issue. I have pihole on docker (win10) and pihole returns localhost for all queries. Does that mean I would have to enable DHCP for pihole in order to see the local private IP of the connected clients?
Note: the internal docker IP is from range 171.17.xx.x but when i say "localhost" that is the host machine - WIN10 with a static of 192.168.xx.x range.
I was able to solve that issue by manually setting the correct IP address (static) within the file /etc/hosts and restart the resolver using the command pihole restartdns