Those spells have a duration, so the monster doesn't dissipate. The monster will continue to attack the caster's opponents till the spell duration ends.
There is a typical fantasy idea that spells end when the caster dies, but Pathfinder doesn't actually have a general rule like that. Spells simply last until the duration ends. You can cast continual flame on a rock and that rock could still be glowing centuries after you die.