Nested accordions not expanding accordingly

Hi, I am trying to nest 2 accordion components within each other. I have both of them created as separate components with the height set to hug contents. Individually, the container resizes accordingly during prototype testing. When nested however, the outer container does not resize with the contents inside. Any suggestions on how to fix this would be appreciated! Thanks in advance!

Video of issue:

Design file: