However, you don't ever need to do that because the situation can be avoided entirely. Simply delay how fast you enter Courtyard from Haunted Towers Entrance. This situation happens if you enter the room before the objective text appears at the top of the screen.
I see. I never knew that this is something that could happen. Must've been a bit of a coding oversight from my guess. Or probably a flag that gets set when that specific objective begins and since I entered the room before the objective the flag was never properly set. Regardless, thanks for the reply and I will definitely keep this in mind for future runs!
I have had this happen multiple times and it has ruined many of my runs on Haunted Towers because of a softlock bug that requires a level restart. It only happens to me when I speedrun the game. I have never once had it happen during a normal playthrough. I have attached a video of it. Has anyone else experienced this bug? And how should I go about avoiding it?