As a proprietary language and kernel, it can never compete long-term with open source alternatives.
It's one thing to have a proprietary product, but for decades now proprietary languages have been a no-go for practically everyone. Even formerly closed languages have been opened sourced, such as Java and C#.
There is no other use for Wolfram Language scripts outside of Mathematica, which comes with a "license server". That's... a dead end.
Can I publish Wolfram code in Docker Hub and expect it to work (legally)? No.
Can I throw some Wolfram code into an Azure Function and have it compute something for me on demand? Nope.
Can I embed Wolfram code into a C# app, publish it on GitHub, and have other people be able to use it without forking out $thousands for a Mathematica license? Nope!
And on and on...
Python, Julia, and Jupyter notebooks will simply wipe out all usage of Mathematica outside of a few esoteric fields. As you said, they're all markedly inferior in almost every way, except for one critical one: they're open and extensible.
You mentioned AI/ML having stopped dead in Mathematica. I noticed that too. I wanted to test some GPU-hosted ML stuff recently that's not the standard Pytorch/Tensorflow type of thing, checked Mathematica, gave up, and I'm now using Julia.
If Mathematica was more open, there would be no "dead end" there, I could simply extend it. Or more importantly, other people would have already.