Accordion mobile no adapting

Hello to everyone

I have a problem with the topic in question. That is, when my accordion is closed it doesn’t show all the contents, despite having a height equal to 100% of the contents, can anyone tell me how to solve this problem? while in preview it presents this problem.