Mobile Safari shows keyboard after page is reloaded

I am struggling with the mobile Safari browser. I am showing a page with a search form via Next.js. When I click into input keyboard shows. When the form is submitted I prevent native submit event. Instead of the native event, I have my own function where I grab all existing query parameters and add new query parameter parsed from the input.

Then I reload the page with router.push function. After the page is reloaded input has still its focus so Safari shows the keyboard.

I tried calling blur on input but when input is blurred then it is immediately called focus event by the browser. This implies showing the keyboard.

Thanks in advance for any answer.