When an OAM thing is in a Muse page, the actual window is seen as window.parent. You should be able to figure out the window's scroll by checking window.parent instead of window. Then you would send your Animate timeline to the frame that matches the scroll of the main window, and not the OAM level.
I don’t understand what you want me to do. What’s a window.parent?
If you read discussions like this:
you'll see how people read the scroll of the window, and in your case you would use that to make your header be bigger or smaller.
But, in Muse when using an OAM, the OAM content (your Animate files), is one level down from the window. So, if you understand the stackoverflow article enough to read the page scroll values, where they talk about:
you would need to use: