This doesn’t work well in practice when switching between Gnome and KDE. Both change configuration in /home, which might break theming and results in strange behavior.
Logging in with a different user for each desktop environment does prevent such issues. Or alternatively deleting the right folders in ~/.config should fix it too.