Print the content of a vaadin-vertical-layout inside a vaadin-dialog-overlay

I have setup correctly the @media print for vaadin-vertical-layout and now I can print the content.
I am using jmix framework that uses Vaadin. Now I try to print the vaadin-vertical-layout but it is inside a vaadin-dialog-overlay.
I am able to print only one page with scrollbars. Apparently inside vaadin-dialog-overlay in th div::part(overlay) there is a section with id=resizeContainer. I am not able to find correct css selector for it and anyway I am not sure that putting overflow:visible there will solve my problem. Can you help me?

It’s probably easier and more future proof to generate a pdf and let people download that, printing web sites is proven to be a maintenance nightmare, especially with the fast moving web technologies, shadow dom and all the other stuff.