You can avoid accidental moving of the tool window buttons or editor tabs by enabling Drag-and-Drop with ALT pressed only.

Drag-and-drop with Alt pressed only option