I'm having issues in saving out a plot with another plot inset within it. Here is a basic example.
theInsetPlot = Plot[Sin[x], {x, 0, 6 Pi}];
plotWithInset = Plot[Sin[x], {x, 0, 6 Pi}, PlotRange -> {{0, 6 Pi}, {-10, 30}}, Epilog ->{Inset[theInsetPlot, {7, 15}]}]
This gives me a plot with an inset plot. If I right click the image and use "save graphics as.." to save out a .jpeg I get the following. Which matches the notebook output image.
However, if I rasterise the image
Rasterize[plotWithInset]
or save out with the following code
Export[NotebookDirectory[] <> "testPlotAuto.jpeg", plotWithInset]
I get this image
As you can see, the inset graph is scaled weirdly. This is the same for all of the different output formats I have tried.
My actual example is are complicated, but this minimal example shows the problem.
I'm on: "12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020)"