The new DNS over HTTPS (DOH) in #Firefox has an anti-feature. It bypasses any ad-blocking entries you might have in your /etc/hosts file.
There's a setting in about:config called "network.trr.mode" which is set to 2 by default. (TRR = Trusted Recursive Resolver).
I set the value to 1, which creates a race between /etc/hosts and the TRR to resolve the domain first and the winner's IP address is picked.
I hope both ad-blocking and #DOH work with this setting.
Ref:
https://daniel.haxx.se/blog/2018/06/03/inside-firefoxs-doh-engine/