The rewrites across multiple versions, that is what killed the desire to target the devices.
I don't understand what you write about Valve, the Steam Deck supports unmodified Win32 games which use DirectX.
The effort to port between Windows and Windows Phone was way less than between Windows and XBox.
Besides that, porting wasn't easy even for apps which worked on Windows already. The API was quite different, and not in a good way. For example none of the standard Windows file I/O API was available. There was DirectX but it was DX11 FL9_3 which is not how you access GPUs on desktop Windows (you would either use DX9 or DX11 FL11_x).
It was still DirectX and Win32 for the most part.
Only FOSS indie devs make such an uproar of OpenGL and friends.
Walk around GDC, PAX, GDCE to see how much professional game developers care.
And obviously the lack of all the Google apps. Again there was obviously some manager on crack thinking that that'll get everyone to switch to the according Microsoft offerings, and maybe people just stop using YouTube. But surprise, it didn't work out!
Also the aggressive power saving which meant every time you were sending some photos on WhatsApp or other messenger, you had to make sure to keep the screen on and the app in the foreground until it's done uploading, otherwise there was a 90% chance it would get aborted and restarted next time you turned on the screen.
Mobile games at the time were all OpenGL ES, which Microsoft refused to support in favor of Direct3D.
Then there was Microsoft's perpetual need to start over. WM6.5 to WP7 broke app compatibility. WP7 to WP8, entirely new APIs. WP8 to WM10 there was UWP and Continuum, again forcing major rewrites if you wanted the new features.
And finally how Microsoft treated the devs themselves. Ad-supported apps depended on Microsoft's ad network which was artificially kept alive by Microsoft injecting money for Xbox and Office ads. Once Microsoft stopped, the whole thing folded, leaving developers with a sudden loss of income.
Developers from countries in Microsoft's 2nd tier additionally reported poor treatment and Kafka'esque bureaucracy preventing them from publishing apps: https://toshl.com/blog/why-publishing-on-the-windows-phone-m...
This is why I think the app situation would not have fixed itself over time, and MS efforts to ease transition like Project Islandwood were doomed from the start, because those fixed a problem but not the problem.