If you can pin it in a hot, dry environment, that can prevent rot. Otherwise, sometimes if a mantis dies from an infection or other illness, rather than old age, that can cause it to rot. I also slice open the abdomen, particularly on large females, and carefully remove the internal organs...