XBox was fine up to the Xbox One -- that's when the XBox was co-oped for some broader push for the living room computing and broadcast television integration right at the time this was on the out.
The next failure was Xbox Live. The video game market is a hit-based market with big tent-pole franchises doing large launches. For a modern example, look at the hype around GTA6. Launches sold games and exclusives sold consoles. Microsoft put huge game launches on Xbox Live for their relatively low monthly cost and lost millions on those launches.
They also bought a bunch of game studios which is a terrible strategy for a console maker. Meta made the same mistake with the Quest.
It's was never the lack of commitment to a strategy -- it was just having the wrong strategy to begin with.