Is there a better way to do this? trying to make sure placed PDF pages use the pre-existing frame on parent (master) page not create a new frame

So ChatGTP and me are having a hours long nightmare just trying to use the pre-existing A4 sized frame (rectangle) on Parent Page A assigned to new pages when I modify the InDesign PlaceMultipagePDF.applescript script to use the pre-exiting frame (rectangle) rather than creating a new A4 sized frame (the idea being I can adjust layout using Parent Page (master page) adjustments rather than needing to write new scripts if I use the object on the parent (master) page.

I discovered that I have to convert exact intergers in millimetres for page bounds {0, 0, 210 mm, 297 mm} to points and while in the UI the equivalent values in Points are the same in script and object — inspection using Script Debugger shows that internally there are 12 or so significant figures to the frame I made in the UI snapping to the page boundaries, not the 5 or 6 significant figures shown in the UI and used in my script.

So I wrote a number rounding handler — but that didn’t work.

I also note that when a document has facing pages the bounds for a rectangle the size of a page might be {0, 0, 841.89, 595.276} for the left page and {595.276, 0, 841.89, 1190.552} for the right hand side, so I needed to test found object bounds for either one or the other boundaries.

Any ideas?