Let me try to better express my point...
I believe that D&D does this already. I don't believe that designing it "as a game" will alleviate any of the issues that arise due to it's widespread playstyles (now using your definition of playstyles)... mainly that robust support will exist for any one playstyle. It's not feasible from a design or sales perspective. To further simplify this... what were the sales of the Book of Nine Swords, Psionics Handbook and Epic Level Handbook... and from those sales what was the actual adoption rate by groups? It's a fraction of a fraction. This is why WotC leaves this design space for 3PP.
EDIT: I also don't understand how in approaching it as a game where more must be defined and codified (unless I am not understanding what your usage of the term means, and if so please correct me) would result in a game that better caters to a wider range of playstyles... it seems it would just narrow the playstyles to those most compatible with said codification of the rules.
I've pointed to examples of commercially-successful games that appeal to multiple player constituencies more robustly than D&D does (even just by the act of having a built-in "difficulty" slider!). If
you don't think they have lessons D&D can learn from, as the saying goes, that's, like, just your opinion, man. And, bluntly put, I have no reason to think you've a better tab on D&D's pulse than I. (It's certainly clear, and fair enough, that you seem to think likewise.)
Look again at WoW: What have the sales of WoW been? Sure, it's not its halcyon days, but it still does well enough. And yet it still manages to robustly support multiple disparate player constituencies, and has done since its inception. Some of these player constituencies are surprisingly niche. Someone else on this site pointed out (might have been Ruin Explorer) that, for instance, the "regular raiding" player constituency is something like less than 1% of the WoW player base. But raiding is still "a thing" that the game supports - quite robustly, if not as robustly as during the Burning Crusade/WotLK days.
The situations for WoW and D&D are not exactly identical, but the principle is there: different player constituencies with different needs can be supported in a robust way by a single game with a more-or-less unified mechanical schema.
So, what I mean is that "WotC should, with the same deliberateness and care as the likes of Blizzard Entertainment or Sony Interactive/Guerilla Games (the respective publisher and developer of Horizon Zero Dawn), ascertain who are the core player constituencies of D&D and how they want to play the game (including how they actually play the game as compared to how it has been designed to date), and then design the game so as to maximally appeal to these constituencies and their gameplay needs".
How well has D&D done this in the past, and how well is it doing it now? I'm not convinced they did a great job in the past (for instance, I think if WotC had done a better job of assessing what the greater part of player base really wanted, we would have got something closer to 5e a long time ago), and I'm not convinced they couldn't be doing a better job now. I'm willing to bet that Tome of Battle had more uptake among the 3.5 player base than, say, the puzzle rules in Tasha's, or the downtime rules and tool-use rules in Xanathar's, or even the social interaction and wilderness exploration rules in the 5e DMG has among the 5e player base, despite the difference in unit sales between that book and the others.
For instance, I'm confident that D&D would be a
better game if, say, it undertook the approach to adventuring gear that I suggested upthread, as opposed to the approach that exists now (which I am confident asserting is largely ignored by most of the player base and is the bane of the remainder of the player base that wants something with more teeth) - although I am sure it would be an
even better game if professional designers were to be the ones coming up with the approach.