I have ran into an issue that is plagued all over google but none of the provided solutions work correctly. I assume the majority of these solutions do not account for cross
The other option is iframeResizer library. There are two methods you can use from within iframePage: scrollTo and scrollToOffset, which do pretty much the same what you've described - they communicate via messages. It solved this problem for us in Safari.
Inside the parent page, when setting up resizing for the iframe, you have to assign a callback function to its onScroll event:
iframeNode.iframeResize({
...,
onScroll: ({x,y}) => callback
}
And inside iframe page:
if('parentIFrame' in window){
window.parentIFrame.scrollTo(0, someNode.offsetTop);
}