Skype was massive and great until Microsoft bought it up, the redesign under microsoft was so trash that nobody wanted to use it anymore and it got nuked from orbit on ratings everywhere, where people where searching for alternatives.
Skype also had this funny thing going on called showing your IP to the point lots of people got doxed which put so much bad rap on the program that it became more of a virus then actually a useful program specifically for gamers or people that wanted to stay in the shadows.
I see no way discord will stay relevent when those fucks buy the program up. They will find a way to nuke it and all it takes is the microsoft name.
Skype was still massive (it even grew) and was great under Microsoft, at least initially. The UI stayed mostly the same for a while, they did have a revamp at one point but it was closer to a reskin than a new UI. Then when they found out that there was a major vulnerability (existed before Microsoft) that would affect all desktop apps and require a major rewrite; they rebuilt the UI using a framework that allowed them to develop faster. At that point the new app had less features and was inherently bulkier due to the technology that lets them develop faster.
Skype is also designed differently at its core than Discord. In the same way that SameTime, Jabber, Lync (Skype for Business), etc. is designed different at its core from Slack (basically the enterprise version of Discord that Discord likely ripped off). Unless they completely redesign what people think of Skype they were bound to lose a lot of people to Discord anyways. What they should have done though, was adopt the Zoom/Hangout model (which they did doing COVID) of creating calls via links. As with Skype was originally designed as a contact based system and they didn't copy that aspect until Zoom got big.
That security problem you mention existed before Microsoft acquired them and they knew about it before Microsoft acquired them. It's only one of the many problems with Skype. A lot of stuff people forget or didn't pay attention to. When Microsoft acquired them they had to revamp their mobile apps because they were garbage, they ate your battery, they were slow, lacked proper offline messaging, message synchronization, broken push etc. So they were at a shitty position on mobile. Desktop on the surface was fine for years apart from the security issue you mentioned but then shit got even worse when they found the other vulnerability and had to redo all their apps. However, the underlying Skype service/infra that any of the apps connect to was, outdated and needed to be completely revamped. Skype was originally designed as a peer-to-peer service and as a result
both parties had to be online at the same time to do things like send messages (voice ,text, files). In the mobile and multi device world this was garbage because it caused problems with message synchronization across devices and also what lead to major push notification problems with the mobile apps. Their infra/service also heavily relied on computers being desktops and somewhat beefy and so they also had to redesign things to offload the apps. The other security issue with Slack which also existed before Microsoft was that they didn't support end-to-end encryption.
Microsoft had to address all these problems and try to be innovative. They could have done better sure. But this idea that Skype was this perfect thing that Microsoft ruined is absurd. Skype was a technological mess that seemed great on the surface.
Microsoft has the ability to build a chat service from scratch very fast, fairly reliably and full of features. They did it with MSN/WLM in the past and they did it again with Teams.
The main advantage Skype had the start was being one of the first with a decent app and having good voice tech but their codecs can be used by pretty much anybody and the problems Skype originally solved had been solved and made public. As time went by, it became easier and easier to build a better mouse trap than Skype with better open standards, more libraries and misc advancements in technology all around. Other services actually get to leverage modern technology instead of replacing or building on top of crap technology. Slack, Discord and Teams for example get to design their backend with modern standards in mind using modern technology; while building desktop and mobile apps using modern technologies that lets them basically reuse a bunch of the code used from their web version; and write less but get more results.