The Trump administration had challenged a court order setting the rules for how detained migrant children should be treated.