You are right that C# is a good example of Microsoft behavior. Tying right into their nervousness on Java, it was proprietarily extending beyond the ECMA standards by layering on .NET. Around 2004 the Mono project pops up to try to cross-platform it, works but poorly, and a in a pretty sketchy patent situation. By 2009 the FSF warning everyone off of it, fearing that extinguishing play.
But by, 2014 Microsoft gives out full patent grants, open sources most everything, cross-platforms and makes Linux a first class citizen, creates the independent .NET foundation. buys out the Mono project, MIT licenses Mono, and donates Mono to the WineFoundation.
Basically the only way Microsoft is making money off of C# these days is full Visual Studio, noting of course that they open sourced VS Code. As for failed, C# still one of the top ten language in use and basically the defacto video game language.
So, you might want to do some reading that's more than a decade old on the topic. Because again there's a dark history and it's fine to be skeptical. But it's counter productive to hate on changed behavior.