Molting is a dangerous undertaking for mantis shrimp and most other arthropods. First, molting itself is not a slam-dunk. Imagine trying to get out of a head-to-toe scuba suit when you've got a nasty sunburn, only worse. Arthropods shed not just their outer body covering, but their eye surfaces, the inner lining of their foregut and hindgut, and even the lining of the internal passageways leading to the respiratory system! It's all too easy for an arthropod to tear off an eyeball or leg, or to get stuck (leading to death) while shedding its armor.
This horseshoe crab died while molting.
When and if the arthropod manages to free itself, it will be largely incapacitated while its armor hardens. Though a newly molted mantis shrimp may look strong and can move around, without a hard exoskeleton, the animal makes easy prey and cannot defend itself just imagine trying to punch a bully with a boneless arm!
It would be hard to defend yourself if you didn't have your skeleton. Arthropods also have problems defending themselves when they shed their exoskeletons.