No, if the government orders you to do something you do it. Disobeying a legal order would be a political statement. ('civil' disobedience)
The GitLab policy was meant to stop ideologically motivated employees from sacrificing the reputation and interests of the company for their own personal political objectives. Of course, enough other compainies have already been taken over by allied ideologues that they pressured GitLab into allowing politically motivated behavior.