Nested Accordion leaves empty spot when collapsed

I’m implementing an accordion menu in which two of the top level accordions include a nested accordion within another accordion.

When you close the top level accordion (that includes the additional 2 accordions) parts of the top level accordion disappear leaving a gap.

Here is the file:
accordion-test.rp (221.3 KB)

Any help on removing this gap is greatly appreciated. Thank you.