When an input element has autofocus attribute, page scrolls down to the element when the page is loaded.
If you want to prevent it, the only way is to catch focus event and scroll to top of page using javascript.
Or you can remove autofocus attribute.
😉