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

Drag-n-Drop with ALT pressed only option