Very annoying keyboard accident.
Only solution that worked for me:
Expand the newly formed terminal column pane so you can see the tab bar .
Right click the tab bar anywhere there is no tab and you will have a context menu where "panel position" is an option.