I have seen enemies from my cage enter the adjacent cage, and vice versa. I have also seen enemies enter the back wall. I seemed to be able to continue attacking (and hitting) them (Ranger, Shortbow) despite losing sight of the target. Clearly, they should be unable to leave the cage at all, let alone walk through walls