Ok, after some more testing it seems I've found one more situation in which the substitute state does not get removed, and that's when the target dies. To explain specifically what's happening in my game:
1. Actor 1 gets poisoned (a state with a negative HP Regeneration trait).
2. On the next turn, Actor 2 uses the substitute skill on Actor 1, which has an auto removal after 1 turn.
3. At the end of that turn, Actor 1 takes poison damage and dies from it.
4. Actor 1 gets revived on a following turn.
5. Actor 1 gets attacked by an enemy, but Actor 2 tanks the hit even though the substitute skill has not been used since before Actor 1 died.
Again, this is with RPG Maker MZ (version 1.10.0), and I turned off all other plugins.