Installer Window Changes Size, Messing Up Background Image (pkgbuild + productbuild + Mojave)

I am creating an installer with pkgbuild + productbuild that uses a background image aligned to the top left with scaling turned off, e.g.,

 

I've designed the background image so that there is a white area near the top to ensure messages shown there are easily seen. (For example, "Standard Install on "Macintosh HD" in the first image below.)

The problem is that the installer window changes its size just after the password is entered, which leaves a white area on the right which is purely cosmetic but does not look very professional.

Here's the window before the password is entered:

and here's the window just after the password is entered:

Note that white area in the middle has become wider and there is now a grey area on the right since the image is set to not scale.

I sort of worked around this by making the width of the image bigger, but it's still weird because the window size jumps after you enter the password.

Why is the installer window changing it size at all? Is that a known bug? Is there anything I can do to prevent this?

Best Wishes,

Mark