Hi Mabel,
I have tried the following and get this result:

Green:
Insert a gallery and change no heights.
Select the gallery template and insert a nested gallery.
Change the nested gallery height then change the nested gallery template height.
Orange:
Insert a gallery and change the height from default.
Change the gallery template height from default.
Select the gallery template and insert a nested gallery.
Change the nested gallery height then change the nested gallery template height.
In the first item of the gallery the nested galleries' template heights are 320 instead of the chosen height.
Sometimes if I close and re-open in the web studio I get it showing the wrong height in the display but the correct height in the property pane.
No matter what combination of sizes I try the first item in the parent always produces a height of 320 on the child template while all subsequent parent items produce the correct height on the child template.
I also noticed that the child gallery does not have a TemplateFill property when it is initially added.
I can only see the TemplateFill property after saving, closing and re-opening in the web studio.