AFAIK, this issue is never directly addressed in the moves or Animatrix shorts, but the behavior here seems to match exactly what we might expect from a virtual reality simulation.
The residual self-image projected by the individual allows the Matrix to maintain a consistent projection of a connected person that matches what they believe themselves to look like. This image of a connected person changes as they age and grow, and the Matrix needs to allow that image to adapt.
Once the person dies, their image no longer changes according to their mental image of themselves. It now changes according to entirely predictable rules of biology and chemistry. The Matrix will have a "snapshot" of a person's residual self image at the moment of their death. From there it can project the expected decomposition, but in effect, the corpse is no longer an image of a living human, but a "prop" made of organic tissue (in the same way I assume the Matrix produces life-like plants and animals.)