fix #39191: Some palettes become empty after adding a new workspace and switching the levels