The decision affirmed a lower court’s ruling from March, but was overshadowed by a Supreme Court order that allowed the Trump administration to pursue deportations anyway.