How to make localnetpriority / netmask ordering work on Windows DNS server when it queries itself?

For a DNS server's resolver, configure a different DNS server's IP address first, this DNS server's IP address second, and localhost IP third.

Even when the DNS service is restarting, it still can resolve from the remote server. Also when using AD DS, a different host first is less likely to cause replication problems.

Second, the server is preferring IPv6 over IPv4. We don't use IPv6 but also don't want to disable it as it has clearly caused problems in the past in different scenarios, and Microsoft claims it is mandatory and does not support or recommend disabling it.

Yes, preferring IPv6 is standard behavior, and Microsoft does not test disabling IPv6. If you do not use IPv6, do not assign IPv6 addresses to hosts. Including, ensure routers do not send IPv6 RAs. If there only are A records for a name and not AAAA, hosts resolve and use IPv4, no further configuration required.