It walks away and vanishes if it gets disconnected from the character it first comes in contact with.
If that character teleports, walks into any dungeon beneath the Fort, or otherwise disengages that proximity connection.
It waits for you outside of elves cave, but any other such disconnection causes it to bug out. Literally.