But I don't see Gitlab making an active decision that they have to do this for sanctions compliance reasons, it was just a side-effect and they didn't care enough for it to change their minds about the move.
Specifically, if I sign up to Gitlab, set my country of residence to Iran, and Gitlab lets me create private repositories, then they are not enforcing the sanctions the way Github does.