Move with drag-and-drop

You can avoid accidental moving of the tool window buttons or editor tabs by enabling Drag-and-drop with ALT pressed only in Settings/Preferences | Appearance | UI Options.

Drag-and-drop with Alt pressed only option