I'm running a SvelteKit project. A link on my homepage references a page section by hash / id on an other page. When I click the link (CSR) the specific page is opened at the wrong scroll position. When I refresh the page or copy / past the url (SSR) the page position scrolls to the referenced page section.
Homepage:
<a href="/detailpage#section-name">
Detailpage:
<section id="section-name">
What can be the reason for the wrong scroll position with client side rendering in SvelteKit?