Eh, I don't think they're quite dead yet. Microsoft isn't a direct parallel to IBM. IBM ignored the cloud early and fell behind because of it, they had to buy Red Hat to remain any kind of relevance at all.
Meanwhile, Azure is the #2 cloud and still growing pretty fast. They own nearly the entire dev tool ecosystem at most companies (Github, VSCode, NPM), and pretty much every single F500 company's IT runs on Microsoft tech, for better or for worse.
The mistake is thinking that Windows is still their flagship product. It's not, it's basically a side quest now.