Microsoft has obviously turned a corner recently into dramatic support for open source collaboration. They're pushing VSCode. They bought github. They support linux. None of us will be surprised to hear that they're seeking to buy StackExchange or Discord soon.
I'm saying: if these are their true colors, then they mount a full-throated resistance to this nonsense. They have the legal team, the technical talent, and the political connections to do so.
Start by refusing to take down Github Pages of nationals of sanctioned countries and refusing to disappear repositories maintained by the same, absent a specific court order. Then, challenge it in court.
Will the US Government have the gall to go to Seattle and cuff somebody over this? If they do, it will be a major international incident and rallying cry, and that person (and Microsoft) will look internationally heroic.
Plenty more explanation here:
We'd finally get the actual sanctions clarified.