The order prevents thousands from El Salvador, Sudan and Ukraine from losing work authorisation while lawsuit proceeds.