If you want to do things properly, you hire separate teams who do native development for each platform, or you hire one Qt team for desktop and two teams for the two app platforms. Of course that's expensive, but again developer vs user side. That's what I mean by cutting corners.
And regarding electron there are different kinds of apps performance wise, like Atom vs VS Code. Discord is more on the Atom side of things, sadly.
Discord is also so big, that interested people develop lean third party clients for it. It's possible, but Discord rather bans them and forces users on the worse electron/web alternative.
One might consider these as cutting corners - hiring web developers to build an app that really should be native
Ripcord's very existence contradicts most of the claims you've made above.
The workflow that I've seen for frontend coding today is that a designer makes a mockup in something like Figma, and then a frontend programmer has to go remake it from scratch in typescript? It seems crazy that we have not made any progress (or even regressed) here in 15 years, but hopefully I'm just out of the loop on state of the art.
I like Qt for how much it enables us to do, but having worked with Qt Designer, it can get off the rails once things get too complex. Probably doesn't help when you enable/disable UI elements programmatically, but still lol
The usual explanation is that non-JavaScript devs (every programmer over the age of 40) was an amazing genius, and we need Electron/Flutter/Node/left-pad/etc now since there are so many new coders. I think you're on to something though. Somehow modern practices just result in wasting incredible amounts of time and effort tinkering with fiddly frameworks and boilerplate code
That being said I would love to have less memory allocation on my devices when effectively idle too.