US court stops Trump from stripping migrant protections