Nice, Linux-behavior on Windows - dynamically linking against the #UCRT, and statically linking against #VCRuntime.
This does work without relying on WindowsAppSdk or other "new" stuff really. Just reproduced in a plain C++-project. No more heap corruption when returning std::string.
https://github.com/microsoft/WindowsAppSDK/blob/main/docs/Coding-Guidelines/HybridCRT.md