It's largely because when Electron first came out the browser app platform (the API availability, performance, etc) was still quite thin and Electron was quite slow. HN just got stuck in this echo that web browsers are very inefficient and have no benefits while native apps are so much better. Java had the same echo for a long time on nerd forums because the JVM was a lot slower than native compiled apps for the first few years of its development.
In practice since then, browser-based apps ended up eating a lot of the demand for native apps and the web browser as a platform ended up displacing a lot of native apps, but the echo has stayed around here with little grounding. As such the distribution, security, and performance posture for browser and mobile apps has become a lot better while native app toolkits have lagged behind.
There's certainly a possibility that agentic development will make native development "cheap" again and encourage a lot more of it. But the web platform's security posture is much more well fleshed out at this point so I'm not sure.
Electron also papered over the problem that browsers weren't evergreen, so if you ran in the user's browser, you might not have support for current web APIs you want to depend on.
Most browsers are evergreen and updated frequently now, to the point that that no longer seems like an issue.