What's the issue?
amp-analytics ScrollManager calculates scroll positions for scroll triggers based on the viewport scrollHeight/scrollTop. For shadow documents (e.g. in amp-next-page) this means it calculates the current scroll percentage from the entire parent document, even if the shadow document is off screen.
Scroll position should be calculated from the shadow document's body height instead, otherwise you will get completely different analytics behaviour when a document is embedded, vs when used standalone.