This isn’t quite true, is it? A mutation that killed 5 years after childbirth would result in higher mortality rates for the child.
They don’t raise their offspring
For the mothers, the entire time is spent cleaning and blowing water over the eggs.
It’s generally accepted this behavior is the necessary pair to their high aggression and cannibalism. It’s likely if they didn’t go through this they’d end up eating their babies. By dying, they make way for a new generation. And this is their reproductive strategy. Live a short very active life. If you survive, mate, then die and leave the hunting grounds to the next generation.
But not whether other adaptations could be possible. Fix the digestive tract issue and keep the female well fed and defending the nest in a different way