Based on the information provided in the extracts, it seems that the behavior you're experiencing is expected. When you use router.refresh(), it refreshes the data for the currently rendered route and resets the client-side state. This could be why you're always sent back to the top of the page and why it seems to load a little longer after router.refresh().
As for retaining the scroll position, one user suggested storing the scroll position somewhere before calling router.refresh(). However, this solution was not elaborated on in the extracts provided.
Here are the relevant discussions for your reference:
For more detailed information and potential solutions, you might want to check out the Next.js documentation or their GitHub discussions.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: