Non-editor builds in UE5.8 crash in MSVC before main method, even in non-modified 1st person template project

I have a 5.7 project which I updated to 5.8. It works just fine in Development Editor build, but when I build it without editor (Development or DebugGame build), the application crashes immediately and silently (no logs, dialogs, nothing). With debugger I was able to see it gets following error:
Exception thrown at 0x00007FFC0A851B6A in MyProject-Win64-DebugGame.exe: Microsoft C++ exception: xSharedMemoryException at memory location 0x000000B0A117ED20.

Attached image below:

I have done non-editor builds earlier in 4.7 and testing in multiplayer setups without any problems. I have been using VS2022 and MSVC 14.44. Now I tried this with VS2026 and MSVC 14.50 as well but I get the same results with it. I did also make a default first person c++ project and try it there. Exact same results, editor builds work, non-editor ones crash to same error.

Any ideas what to try out next?