Localhost mostly works, and I use localhost when it does work.
But when it fails (once a week or so, and this keeps happening on 3 different machines running the latest/a recent Insider build), usually after the PC wakes up from sleep, I have to restart the PC to access via localhost again, which is undesirable for me because I have to spend 10 min restoring all apps & windows back to how they were.
Or I can use the IP address directly and map it to a friendly hostname, in my case `wsl` and keep working. This is done behind the scenes with a scheduled task, so when I see `localhost:PORT` doesn't work, I just retry it with `wsl:PORT`.
The reason I haven't linked to a specific issue is that there's just so many [*], and localhost sharing is still buggy and hasn't been fixed even after 2 years.
[0]: https://github.com/microsoft/WSL/issues/5298
[1]: https://github.com/microsoft/WSL/issues/7492
[2]: https://github.com/microsoft/WSL/issues/6725
[3]: https://github.com/microsoft/WSL/issues/4885
[4]: https://github.com/microsoft/WSL/issues/5439
and many more.