Viewer Off-Center When Using Zoom on Portrait Image

Try to reproduce this issue:

I have the image viewer open on a 1080x1920 screen (portrait mode).
I open an image with landscape dimensions, with zoom mode set to "fit".
I use the zoom button. The viewer zooms the image, keeping it centered.
But if the image has portrait dimensions, the viewer fails to keep it centered, which is what I wish it would do, like for the landscape image.

What are the dimensions of the images that you see this with?

Do you mean the image is not centered within the viewer, or that the viewer window itself is not centered on the screen?

How are things configured under Preferences / Viewer / Appearance?