Legend cut off when plot wrapped in details html tag

I have the exact same issue, ive set the frameborder to be 0, however never specified display:none. I’m unsure how to implement your solution. When would I want to load the iframe and how would I intend on specifying when it loads? If nothing is hidden I’m confused why I’d need CSS visibility