The order brings the administration’s bid to end legal immigration status for people fleeing dangerous countries back to the high court.