Interestingly I have not considered that you could get locked up at the top of the tower if you're unable to defeat the boss.
Did you got stuck behind a stone by getting knocked into, or by switching rooms? In case of the latter, was it a certain room in particular?