There have been a lot of discussions around this topic but there's no working code solution for copying pages with web parts across site collection. Everyone suggest using SP designer. Is there any csom or REST api solution to achieve this? I have tried LimitedWebPartManager class, export/import and creating the web part xml programmatically but none of this works for 2013 On-prem.
I faced a similar problem. Due to timeout I decided to use a PowerShell script, which calls the REST API in my CSOM C# application. Not ideal, but it works.
The script ist from: