This has intrigued me because eventually that’s what they ended up doing - although with two major caveats.
Firstly, the mobile space did not have room for 3 players - MS tried very hard and their Nokia phones were pretty good. But it was just one platform too many. They just couldn’t find a niche for itself as Android was being used everywhere due to their open source branch. Proves the point made by you though, there wasn’t space for a second Android if MS were to embrace open source. Nokia tried hard with Meego - I loved the UI but the market was moving at light speed back then.
Secondly, HMD started by branching off from the Nokia of yore and their Android devices are also very good.
I’ll always miss my old Nokias, they were the duopoly with the BlackBerry in the pre-smartphone era.