Getting back to side bar after detaching layer panel in QGIS?
Just double click on the layer panel window title (applies to QGIS 2 and 3).
Double-clicking the title bar of floating windows on MacOS will maximize the floating window instead of docking it. I tried dragging the floating window to the approximate location of where the panel was docked but it didn't work. I restarted QGIS 3.6 and dragging the window appears to work again, and other panels will "slide" out of the way to make room for dropping the floating panel.
Inability to dock floating "Layers" panel is still a bug in QGIS 3.10-5 (LTR) on Windows 10 1909. However, as others have suggested restarting QGIS then immediately double-clicking the "Layers" title bar successfully docked it for me.
This is reported as 2 related bugs in the QGIS GitHub issues page here:
- https://github.com/qgis/QGIS/issues/29177 (Feb-Sept 2019)
- https://github.com/qgis/QGIS/issues/29909 (May 2019)