Modern Document List in classic site with Iframe

I am currently building a document management site, and I decided to go with classic experience so I can add custom scripts to my site but I decided to use Modern Experience for a document list (basically because it’s faster and overall better looking). Problem is you can’t have a modern Document List as a web part in a classic experience page if you have a script editor in that page. So I decided to open my document list in my classic experience page with iframe and it worked pretty good!

There’s only one thing I need to complete. I need to hide the Details Pane of the document list (that’s a request). I know that you can’t add scripts in a modern list but maybe with the iframe I can access the button with a querySelector and hide it using Javascript. Problem is I tried doing that a million different ways but even if I manage to hide the button in the browser’s console I can’t get it to work in a script. Any ideas here?