Fixes a crash when there's some previously focused text fields,
and the user tries to exit via the confirmation dialog.
Before a state switch HaxeUI tries to reset the tooltip manager and
remove all components, which in this case causes it to refocus a text field,
which tries to access a destroyed camera to retrieve the bounds.
Doing this ensures there's no text fields for it to do that.