Looks like a bug. Try creating a minimal reproduction project with just these 2 scenes and creating an issue on GitHub. Don't forget to mention that it happens in both Godot 3 and 4. Best of luck.
post
Base class for all UI-related nodes. Control features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and offsets relative to the anchor. The offsets update automatically when the node, any of its parents, or the screen size change."
Could it have something to do with the screen changing size, or changing of it parent node (or grandparent node)?
From a glance, I'd tell you to take a look at the Hbox Bottom -> Bottom first, the one that has both a Control and the BallsCounter. These box container nodes will auto expand to fit all content.
An alternative would be scaling that Bottom node, instead of resizing it.
My guess is it’s likely not a bug but an unexpected (by you) interaction of the tool script with whatever layout you’re doing.
If you can post example code demonstrating the problem someone will probably be able to pinpoint what’s happening.
all 9 comments