It's neither. DNS worked exactly as expected when using the FQDN. Your machine looked up the IP address of the domain, and it returns the Public IP. Your issue is with the way NAT works, which is exactly what it is also supposed to be doing.
So your solution of adding the domains to the hosts file is a great workaround. The other one can be found here: https://www.the-art-of-web.com/system/iptables-nat/