Hi @Daniel Brokhman ,
Unfortunately, based on my research and testing, it is not possible to make the container resize to auto size.
As a workaround, you can try to use SPFX to create a custom web part and then enable support for full-width columns. Please refer to the documentation: https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/basics/use-web-parts-full-width-column#enable-support-for-the-full-width-column
Hope it can help you .Thanks for your understanding and support.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.