You are using Safari in Full Screen Mode and unfortunately you cannot disable this automatic behaviour.
You could come out of Full Screen Mode, place the cursor to the top of the screen and when the menubar shows click on the Green button, you will now be in normal screen mode but you can expand the Safari window to fill the screen, this way the sidebar will only be activated when you want by clicking its icon in the Toolbar, top left.