I found that Microsoft Edge has its own DNS resolver that prefers using TCP over UDP. I found that this was causing slower responses, especially when returning to the browser after not using it for a while.
The fix is to add a registry entry as follows:
Path: SOFTWARE\Policies\Microsoft\Edge
Value name: BuiltInDnsClientEnabled
Value type: REG_DWORD
Value: 0