Fortunately that issue is fixed now. https://bugzilla.mozilla.org/show_bug.cgi?id=1544233 Hosts file works fine here with Quad9 resolver.