Chief Justice John Roberts and Justice Brett Kavanaugh joined the court’s liberals to confirm the lower court’s decision.