error executing command "dance.modes.set.normal": calling EditorState.setMode in a mode change handler is forbidden
It doesn't show any error when trying a second time. I haven't yet deduced a pattern to the conditions, but it might be related to some sequence of edits preceding the Esc.