Warning: this only applies to legacy Microsoft Edge, not the new Microsoft Edge based on Chromium.
- Enable localhost loopback in about:flags of Microsoft Edge.
- Download Fiddler (https://www.telerik.com/download/fiddler) and click the WinConfig button, this will open a UAC which will change the loopback handling.
Source: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/16262643/