I don't see any stats saying VSCode has won "everything that isn't enterprise Java", that's clearly wrong as it's not really used for .NET stuff and most C++ for gaming is still classical Visual Studio. And JB IDEs have a lot of traction for any language they support outside of Java too.
GitHub Codespaces isn't a revenue model for the IDE. It is a separate product that requires a separate team, so it'd have to be charging a lot of money indeed and get a lot of users to fund two products for the price of one. It also looks like a rather basic featureset - if it takes off as a product it is not very hard to integrate into its competitors or build a similar system.
A lot. Not that they have to do it alone, because a lot of the work on VS Code features is done by other people with their own motives (some volunteer community types, but also each of the major cloud platform vendors is investing in VSCode integration into their systems, too, and the same is true for lots of other firms.)
> Its lack of revenue model limits them
If they are imminently going to be selling a hosted editing environment built around it (Github Codespaces), does it really lack a revenue model?
> a free IDE that competes with their own revenue generating VS product
Even with VS, they've long focussed on subscription services not software licenses as the main revenue source. “Visual Studio” subscriptions (formerly MSDN) are the big push, and most of what comes with that isn't the IDE.
And VSCode is very well integrated with lots of the services they are selling.
> VSCode is going to be stuck focusing on the JavaScript/web stack for a long time and won't receive a lot of funding to grow out of that.
It's not stuck there now, and right now MS’s biggest push in terms of domains seems to be ML/AI. I think VSCode is poised to do quite well for— in fact, has largely already won much of—everything that isn't enterprise Java, where, yeah, there’s a lot of time and money on the alternatives and not a lot of MS resources devoted to competing.