It's not about language quality, it's about barriers to entry.
You not only have to be "better" than JS (which I guess means some combination of performant and pleasing to code), but you have to do so to such a degree that it's worth losing access to/reimplementing the existing libraries, not to mention getting multiple browsers to implement AND getting everyone to install the newer versions of said browsers (not as bad as it was, but still an issue).
I currently do JS for a living, and I don't hate it, but most of the reasons to DO javascript coding have nothing to do with quality of language and instead have to do with how unlikely a viable competitor is to come about anytime soon.
I don't hate JS, but I do find it a bit taxing to write JavaScript that might have bugs due to unexpected behavior in the language. I'm in the process of rounding out my self-taught programming mojo with some intro to CS courses, and the professor started talking about syntactically correct code. He gave the example of something like `3 + "hi"` being syntactically incorrect, saying it wouldn't run (in Python). My first thought on seeing that example was "JavaScript will run that!", and I didn't mean that as a compliment.
Of course, I know that. But companies are rich. They both have their own major browsers. They can just pay to Mozilla and Apple (two remaining major browsers) to support their language(s). Libraries are not a problem for .Net, Go, Swift, Rust.
All four companies have success with their own programming languages, which is not an easy task to do. Some of them are also succeed with their own OSes too, which is even harder. They CAN replace JS if they push a language strong enough. They cannot do that because replacement languages are worse than JS.
I currently do JS for a living, and I don't hate it, but most of the reasons to DO javascript coding have nothing to do with quality of language and instead have to do with how unlikely a viable competitor is to come about anytime soon.