The ruling comes as President Donald Trump and his administration are shifting to a softer tone on immigration operations.