UI Problem with computed height

Hi,
I found a problem with the UI.
Here is the sample project
https://playcanvas.com/editor/scene/628369
The two entities Group1 and Group2 should have been stacked one below the other, instead they are superimposed. It seems that their height is incorrectly calculated. Can you tell me how to solve the problem?
The only workaround I found is to set the size of the two groups but if their content is dynamic each time the value must be recalculated

LayoutGroup elements don’t update their size based on the content. If you need the size of the element to dynamically change you have to calculate it yourself.