The ruling that immigration agents are acting illegally is the latest to rebuke the Trump administration’s tactics, but earlier orders have been blocked on appeal.