Microsoft Security Response Center official guidelines are:
1 - Use a managed language like C#, Java, Go if automatic memory management is ok
2 - Use a systems language like Rust if automatic memory management is not an option
3- Use C++ alongside Core Guidelines tooling.
Granted, not all Microsoft projects care about those guidelines.
MSFT, Google, Apple, Facebook all have a gazillion lines of C++ and it's not going away any time soon. "Don't use C++" is not practical advice for them and many other companies.