it looks like the rationale is outlined in this commentary within the implementation. specifically the case you've identified seems to be 2. (c), which states:
If the type is Codable, do nothing. This is because removing the key will break encoding which is most likely not what the user expects.
there is some more motivation in the associated PR and a past thread.