When changing workspaces, existing object-mode data is freed the new workspaces mode is entered (if possible).