Anchors inside the iframe are not working on iOS

Our site is inside an iframe. In our menu, we have positions like About Us, Products, Events. Those are anchors to sections on the main page of the site.
They are working correctly on the desktop and Android browsers (on mobile).
They are not scrolling down on mobile browsers in iOS.

During chat session, there was research done that concluded that iframes are problematic on iOS, but we found this script that should make it work on iOS.

But it needs changes to be applied to our site (we would like to avoid changing HTML output).