The current design of the OpenModelica GUI requires that the models are valid. This is needed for the diagrams.
Right now there is no workaround. Please follow https://github.com/OpenModelica/OpenModelica/issues/13039