In the Dark Castle, the cell with the ghost, one of my characters entered the cell by crawling through the hole, then he triggered the ghost battle. My other 3 characters were locked outside the cell.
1) my first guy in the cell tried to flee by leaving the room the way he'd come in (crawling thru the hole). The software didn't allow that. Nor would it allow any of my other 3 characters to enter the room thru the hole.
2) My poor cell guy ran onto the lockstone, hoping it would open the cell door to let the rest of the party in. The lock stone did not activate.
3) Fortunately for my party, my fighter run up to the cell wall and hit the ghost thru the bars. You shouldn't allow normal combat thru the bars. At the least, it should be disadvantaged if you allow it at all. My other characters could shoot bows through the cell bars too, without disadvantage or the ghost getting partial cover AC+2.
As soon as the battle was over, standing on the lock stone opened the door.
While I'm writing about the maze, for goodness sake stop characters running over the top of grills -- and potentially taking damage -- once they know the grills are often trapped and there are easy, open paths around the edges of the grills.