Report comment

Hi jay, i have tried to replicate your issue with Jessie and Stretch and not found a problem. Which version of Raspbian are you using?
I renamed the resolve.conf file to hide it and then got dns errors as expected.

The /etc/resolv.conf file should contain your dns server details. When the network wifi is active the system automatically populates the resolv.conf file. My one shows the ip to my local router. When in hotspot mode the system changes it to the local ip , then changed it back once the network is back. Can you check the content of the resolv.conf file as this may be your issue.

I don't know if this is anything to do with purging the dns_root_data for dnsmasq as i have not had any issues with doing that.

If you are still having issues, let me know more details and i will look into it further.