A corpse is a character for which the Osiris API CharacterIsDead() returns true.
The behaviour scripts of dead characters stop executing, which is why your approach did not work.
If you want to do something with dead characters, you will have to do it from
Osiris or possibly from a game script (throw an event in that OnDie handler that you catch in a gamescript, and implement your logic there).