Dock widget to a SidePanel

In VS Code editor, some widgets are docked, in the sense that they cannot be moved anywhere else within the layout. For eg. the explorer widget is always docked to the left side panel and we cannot move it elsewhere. How can I fix/dock my custom widget to a side panel? Also, is it possible to make it non-closable?

For fix/docked you will need to dig into internals of the shell. For non-closable Widget.title.closeable = false