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