ScaleBox scales incorrectly for the first frame

Hello,
I’m experiencing an issue with the scaling of a widget on the first frame. Specifically, the Widget is a Button containing an Image, which is placed inside a ScaleBox set to “Scale to Fit X”. The ScaleBox itself is a child of a VerticalBox.

I’ve attached two images to illustrate the problem:

Image 1: First frame (where the scaling issue occurs)

Image 2: Second frame (after the issue corrects itself)

Any ideas on how to fix or work around this?