Thank you for answer. but when I do what you say, my computer's wifi and ethernet connection capabilities are disabled.
Is there any other solution?
Your issue was intentionally introduced into Windows by Microsoft. Nothing you can do about it from what I can tell.
You are correct - disabling local DNS caching (which is what the dnscache service does) essentially disables networking, because Windows has been changed so that networking requires a LOCAL cache (even though there's no logical reason for that). Telling Windows to NOT rely on the dnscache service for networking using the registry (by removing "dnscache" from the "NetworkService" key in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Svchost and HKLM\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Svchost) doesn't work - as soon as you disable the dnscache service, your computer will no longer automatically fallback to an external DNS server for lookups, which basically makes your networking unusable. (You may still be able to ping external IP addresses, such as 9.9.9.9, but trying to go to "example.com" will fail.)
Your only options are to do nothing and stay broken, go to back to a previous version of Windows 11/10 (before the change was introduced) and hope Microsoft doesn't force you to update anyway, or something drastic like switching to a completely different OS. None of those options are ideal, but unless Microsoft decides to give power users better control over their security, you're stuck.