Yeah. This is a difficult problem to solve and it doesn't seem like any website gets it right all of the time across all devices from what I've seen
Not just websites. Chrome on Android does this. It loses its scroll position in its tab tile list when switching between viewing the list and viewing a tab.