This is it in a nutshell, with a lot of corps; IBM, Microsoft, etc. Be careful who you lie in bed with. Seemslike newer companies like Facebook and Google have a much much better track record. They may end a project but they don't suck you in and then say "nah, it's proprietary now"
AOSP used to be the complete Android system, more or less. And when you bought a Nexus device from Google, that's what you got. But they progressively abandoned the stock apps to replace them by their proprietary counterparts, or ones tied to their online services.
Then, they replaced their Nexus line of phones with the Pixel line. Pixels are full of proprietary technology, and their last move was to make Android development private.
AOSP is still fully open source and allows you to build a complete Android system on it though. Theirs open source GrapheneOS, LineageOS, /e/OS, and the closed source onset on Chinese domestic phones that have their own proprietary versions on play services.
Here's a pretty good Linus Tech Tips video where he installs stock AOSP on a Pixel phone and goes over how it's virtually unusable. Just like you say, while the Pixel UI may be Google's vision for how the Android platform should work, they've moved to keeping their UI development private just like every other Android vendor. Meanwhile, stock AOSP has basically been left to rot. https://www.youtube.com/watch?v=-hlRB2izres
The track record of Facebook and Google may be better because their open-source strategy is to never open things that are core to their business. Projects like React will not give you a competitive advantage to build a Facebook competitor. What a project like React gives to Facebook is marketing and a carrot to bring promising talent to the company.
The issue with VS Code is that it opened the door to many other editors, which, in a sense, drive people away from the Microsoft ecosystem. The combination of VSCode, GitHub, and TypeScript is ideal for MS: they win by attracting companies to GitHub services (which also offer code spaces based on VSCode); they also win by attracting users to Copilot, which helps them improve their tools. Creating an editor like VS Code is expensive; they are not paying the core developers because they prefer to give away money. They do it because it's part of their business strategy. You don't pay for VS Code; companies that subscribe to GitHub services do. A VS Code fork circumvents that strategy.
Eh. Google may be better than Microsoft in this regard, but this is basically what they're doing with Android. AOSP is now lacking a lot of core functionality that comes with Google Pixel phones, such as RCS messaging, emoji reactions to text messages, camera features and photo editing, voicemail transcription, crash detection. Even the keyboard is worse in AOSP.