If the map size shrinks, this also happens when you open a map or create a blank one, the surrounding view doesn’t. And this view is centered. Did not figure out how to fix this, but this is probably possible.
As long as the whole map fits in the window it’s centered. As soon as it does not fit anymore, the pixel under the mouse cursor is the anchor for zooming. The Gimp has exactly the same behavior.