They still have good APIs, but everyone use D3D because it's has larger market share and not because it's superior. Decade ago many developers still used whole DirectX package: input handling, sound, network. Now it's mostly just D3D. It's was possible for Microsoft to grow DirectX mindshare by adding more components: physics engine, particles and effects, advanced networking or server management pathfindding and AI, VoIP, matchmaking, etc...
Instead they were focusing on Xbox and let their PC ecosystem rot. Now Nvidia, Valve, Epic and other middleware vendors consumed this market. They tried with GFWL, but it was a dumpster fire.
They now try again with Game Pass for PC, but again they just want to push Xbox ecosystem instead of Windows gaming as whole.