Some events cannot be completed due to enemy positioning

For example, twice today, I had this. First was a cursed chest, 2nd a cursed shrine. Near the end of both, an enemy spawned inside a bit of scenery such as a wall or pillar where they were unkillable preventing the event from proceeding.