
Add a simple treeview in ToolWindow (for example) contained in a DockSite. Make the treeview Selectionmode="Multiple" (to ensure all cases are checked).
Add items in the treeview through ItemsSource, but don't bind SelectedItems and let the treeview manage itself items expand state (expand and selection is not managed by view models).
Expand and select many nodes of the tree.
Move this toolwindow (make it float, pin it, hide it if not pinned) => Only root nodes are visible (all other are collapsed) and selection is lost.