ViewCaptureToFile with PrintDisplay on does not output the viewport

ViewCaptureToFile prompt shows what is visible in the viewport, but the file generated does not match the preview.

This error occurs when the resolution set is not “Viewport”