It’s not a bug it’s a feature, called network isolation. It was introduced in Windows 8 (where Metro apps were called Windows Runtime apps).
For security reasons, a UWP app that is installed in the standard
manner is not allowed to make network calls to the device it is
installed on.
The feature can be disabled in Visual Studio debug settings, also the article How to allow loopback for Windows Runtime apps talks about using the CheckNetIsolation Windows tool to enable loopback access per application:
CheckNetIsolation.exe LoopbackExempt -s
CheckNetIsolation.exe LoopbackExempt –a –p=S-1-15-2-4125766819-3228448775-2449327860-2490758337-1264241865-3581724871-2122349299
There are also GUI tools such as Enable Loopback Utility and Loopback Exemption Manager which make this task easier: