For 25.0.2, I added a suite of commands (no default key bindings for them) toggle_*_pinned, similar to the existing toggle_* commands for toggling whether a tool window was visible or not.
Example: toggle_search_pinned
1) If "Search Results" was not visible, it will make it visible, doing exactly what "toggle_search_results" would do.
2) If "Search Results" is visible and docked, it will unpin it (make it an auto-hidden tool window), along with all other tool windows in it's tab group.
3) If "Search Results" is unpinned (auto-hidden), it will pin it, making it a docked tool window, along with all other tool windows in it's tab group.
4) If "Search Results" is visible and floating, it will unpin it (make it an auto-hidden tool window).