Maximize safari window
You can't overlap a window over the Dock. The Dock, even when hidden, will consume space on the side it is set on. A workaround is to move the window down such that the bottom of the window is where you desire (you may need to hold alt to disable sticky window edges), then pull up the top of the window. If you wish an app to consume the entire screen, you will need to use Full Screen.