Needed follow-up on https://github.com/pandas-dev/pandas/pull/40580 (and https://github.com/pandas-dev/pandas/pull/40033), we should deprecate the setter of the `Categorical._codes` property.