How do I avoid inadvertently switching workspaces?
There's a hidden preference for adjusting the delay in seconds:

defaults write com.apple.dock workspaces-edge-delay -float 0.5
osascript -e 'quit app "Dock"'


It can be set to an arbitrarily high value to disable dragging windows to other spaces.