Vertical Layout Group has a different behaviour between Editor and Android device

I’m trying to create dynamically a list of buttons in a panel with a Vertical Layout Group component.

All seems to work well in the Editor, but when I’m going to test the game on my smartphone, I have a different behaviour on the list rendering. These are two screenshots: on the left the Editor game (this is what I want), on the right the Android game:
152321-cattura.png

These are the components in the the Panel:
152322-inspector.png

What can I do to solve this different behaviour?

Thanks in advance

Finally, I have found the solution. In the script which generates the list dynamically, at the end I didn’t call

LayoutRebuilder.ForceRebuildLayoutImmediate(GetComponent<RectTransform>());

This method force the layout to recalculate its content size.