Unfortunately it is not :(. The change will get wiped any time HA is restarted.
> If the internet is not working (because general connectivity is lost, or someone blocked the DNS server, whatever) then of course the internet-using parts will cease to work, but local network parts should still be working.
Local network parts stop working as well. A DNS lookup for a non-existing local domain results in the query being sent to Cloudflare. This cannot be prevented.
> The config file is pretty clear that it is not supposed to use DNS servers, cloudfare or any other ones, for the local network connections. If this is not the case, you should file a bug.
Many bug reports have been filed about this: https://github.com/home-assistant/plugin-dns/issues.
If you look at the config file, SERVFAIL and NXDOMAIN responses are considered to be a "failure" and queries are sent to Cloudflare. This is a poor design decision, not a bug.
Re "slow to a halt" issue, this sounds like a bug independent of the upstream server issue. If the internet is not working (because general connectivity is lost, or someone blocked the DNS server, whatever) then of course the internet-using parts will cease to work, but local network parts should still be working. The config file is pretty clear that it is not supposed to use DNS servers, cloudfare or any other ones, for the local network connections. If this is not the case, you should file a bug.