How to rescale a container

Godot Version 4.2.1

Question

I want to change the scale hotbar to 0.5, but the following happens:

Scale 1

Scale 0.5

I know that to change the scale you need to change the pivot, however the hotbar elements are added dynamically and I can’t identify a “formula” to change the pivot, so am looking for another way.

I used an AspectRatio container, gave it a size of Viewport.H * 2 and then reduced Scale to 0.5, put the finished container in it and everything seems to work fine.