I got it done by changing the DragListener class in the Golden Layout.
In the goldenlayout.js file, the script creates an e.utils.DragListener. On the onMouseDown function I added the following condition:
if (t.toElement.className == "lm_drag_handle")
With this, the drag doesn't listens the event while clicking on the header of the widgets, and will still work when trying to resize the widgets area.