In the newest update of Photoshop CC 2019 (version 20.0.0), Adobe has made it easy to lock your panels so you can avoid accidentally dragging them off the interface. To do this, go to Window, Workspace, Lock Workspace. This locks your panels and the placement of them, but you can still resize them.

Note that this does not impact your document tabs, so you can still easily move those around to manage your workspace.