SaveScreenshot and ViewSize resolution issue

I`m having an issue with SaveScreenshot method. It gives me an image with different resolution.

Here is a sample code

from paraview.simple import *

resolution = [1200, 900]
view = GetActiveViewOrCreate('RenderView')
view.ViewSize = resolution

SaveScreenshot(filePath, view, ImageResolution=resolution, OverrideColorPalette='WhiteBackground')

When running this code block it gives me 1200 x 845 screenshot (while my display has 1920 x 1080). If I comment out the view.ViewSize = resolution line it will give the image of requested resolution, but in that case the color legend for selected field will have wrong scaling spanned all over the image.

It’s on Windows 10 platform. Tried it on 5.7, 5.9, 5.10 Paraview versions - getting the same behavior across all versions.

What could be the reason for such behavior? Am I missing some setting?
How can screenshot with requested resolution be generated correctly?

I wonder if the window decorations are getting computed into this somehow?

Cc: @mwestphal

That would definitely be a bug. Do you have the same issue in ParaView proper ?

Yes, the same works fine from Paraivew UI.

Could you open an issue on: ?