[Android Apps and Games] DiamondJohn:
Sorry I haven't responded sooner, and I am sure I have been quoted more times, but at least the following should be addressed.

The "Wireless and Networking" is simply a grouping/placeholder of a generic area, it does not mean that every setting under there affects everything in relation to networking as a whole.

Once you enter into WiFI, those settings only affect your WiFi, not your Mobile data.

Or in more clarity, the DNS settings you set on a WiFi network, are specific to that specific WiFI network, they do not set the DNS for you mobile network.

Taking it further, under WiFi, you could have two (or more) WiFi connections, each with different DNS settings. It does not make logical sense. Which one would be used for "all" your other network interfaces?

You phone actually has many many network interfaces, each with their own DNS settings.

To give you a further example. I run a boot script to set all my DNS settings across all my internet interfaces (which override the settings in WiFi), and if I run a check, I get the following:

Running Values:
------------------------------------
inet 192.168.1.19/24 brd 192.168.1.255 scope global wlan0
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.19
[dhcp.wlan0.dns1]: [1.1.1.1]
[dhcp.wlan0.dns2]: [1.0.0.1]
[net.eth0.dns1]: [1.1.1.1]
[net.eth0.dns2]: [1.0.0.1]
[net.pdpbr1.dns1]: [1.1.1.1]
[net.pdpbr1.dns2]: [1.0.0.1]
[net.ppp0.dns1]: [1.1.1.1]
[net.ppp0.dns2]: [1.0.0.1]
[net.rmnet0.dns1]: [1.1.1.1]
[net.rmnet0.dns2]: [1.0.0.1]
[net.rmnet0.dns3]: [1.1.1.1]
[net.rmnet0.dns4]: [1.0.0.1]
[net.rmnet1.dns1]: [1.1.1.1]
[net.rmnet1.dns2]: [1.0.0.1]
[net.rmnet1.dns3]: [1.1.1.1]
[net.rmnet1.dns4]: [1.0.0.1]
[net.rmnet2.dns1]: [1.1.1.1]
[net.rmnet2.dns2]: [1.0.0.1]
[net.wlan0.dns1]: [1.1.1.1]
[net.wlan0.dns2]: [1.0.0.1]

====================================
Property Values:
------------------------------------
[dhcp.wlan0.dns1]: [1.1.1.1]
[dhcp.wlan0.dns2]: [1.0.0.1]
[net.eth0.dns1]: [1.1.1.1]
[net.eth0.dns2]: [1.0.0.1]
[net.pdpbr1.dns1]: [1.1.1.1]
[net.pdpbr1.dns2]: [1.0.0.1]
[net.ppp0.dns1]: [1.1.1.1]
[net.ppp0.dns2]: [1.0.0.1]
[net.rmnet0.dns1]: [1.1.1.1]
[net.rmnet0.dns2]: [1.0.0.1]
[net.rmnet0.dns3]: [1.1.1.1]
[net.rmnet0.dns4]: [1.0.0.1]
[net.rmnet1.dns1]: [1.1.1.1]
[net.rmnet1.dns2]: [1.0.0.1]
[net.rmnet1.dns3]: [1.1.1.1]
[net.rmnet1.dns4]: [1.0.0.1]
[net.rmnet2.dns1]: [1.1.1.1]
[net.rmnet2.dns2]: [1.0.0.1]
[net.wlan0.dns1]: [1.1.1.1]
[net.wlan0.dns2]: [1.0.0.1]

As soon as I turn off my WiFI, and switch over to Mobile data, you can see the DNS is reset to some other server for some of the network interfaces:mad:.

Running Values:
------------------------------------
inet 10.15.213.221/30 scope global rmnet0
10.15.213.220/30 dev rmnet0 proto kernel scope link src 10.15.213.221
[dhcp.wlan0.dns1]: [1.1.1.1]
[dhcp.wlan0.dns2]: [1.0.0.1]
[net.eth0.dns1]: [1.1.1.1]
[net.eth0.dns2]: [1.0.0.1]
[net.pdpbr1.dns1]: [1.1.1.1]
[net.pdpbr1.dns2]: [1.0.0.1]
[net.ppp0.dns1]: [1.1.1.1]
[net.ppp0.dns2]: [1.0.0.1]
[COLOR="red"][B][net.rmnet0.dns1]: [10.143.147.147]
[net.rmnet0.dns2]: [10.143.147.148][/B][/COLOR]
[net.rmnet1.dns1]: [1.1.1.1]
[net.rmnet1.dns2]: [1.0.0.1]
[net.rmnet1.dns3]: [1.1.1.1]
[net.rmnet1.dns4]: [1.0.0.1]
[net.rmnet2.dns1]: [1.1.1.1]
[net.rmnet2.dns2]: [1.0.0.1]
[net.wlan0.dns1]: [1.1.1.1]
[net.wlan0.dns2]: [1.0.0.1]

====================================
Property Values:
------------------------------------
[dhcp.wlan0.dns1]: [1.1.1.1]
[dhcp.wlan0.dns2]: [1.0.0.1]
[net.eth0.dns1]: [1.1.1.1]
[net.eth0.dns2]: [1.0.0.1]
[net.pdpbr1.dns1]: [1.1.1.1]
[net.pdpbr1.dns2]: [1.0.0.1]
[net.ppp0.dns1]: [1.1.1.1]
[net.ppp0.dns2]: [1.0.0.1]
[B][COLOR="Red"][net.rmnet0.dns1]: [10.143.147.147]
[net.rmnet0.dns2]: [10.143.147.148]
[net.rmnet0.dns3]: []
[net.rmnet0.dns4]: [][/COLOR][/B]
[net.rmnet1.dns1]: [1.1.1.1]
[net.rmnet1.dns2]: [1.0.0.1]
[net.rmnet1.dns3]: [1.1.1.1]
[net.rmnet1.dns4]: [1.0.0.1]
[net.rmnet2.dns1]: [1.1.1.1]
[net.rmnet2.dns2]: [1.0.0.1]
[net.wlan0.dns1]: [1.1.1.1]
[net.wlan0.dns2]: [1.0.0.1]

You will also find many (but not all of the above) set by the guy who has created a Magisk module to reset your DNS. ie I am not alone in my understanding.

There are also many posts in this thread of people who find that under WiFi, their host file is working, but under Mobile Data, is stops working. I had the same issue, until I started controlling all my DNS settings, across all my network interfaces.

I am running the above checks using the App I build TeMeFI, under the menu item "Currently running>Network>Current DNS"

https://xdaforums.com/android/apps-games/app-temefi-comprehensive-documentation-t3806260

So, the above is why I believe that your WiFi DNS, is not the same as the DNS used by your mobile data. Just see the change above (in red). The thing I do not understand, is why switching DNS servers should stop the host file from being used. That is well beyond my pay-grade.