I saw that someone had reported this on the steam forums, but I didn't see it here.
Unlike the Alchemist's Golem, the Worm-that-Walks pet has no "self destruct" ability, which means that you can become trapped if there isn't anything left in the zone that is capable of killing your pet after your main character has died.
Pet Worm-that-Walks stuck after death of Writhing One
Moderator: Moderator