Detach Legend from Plot/Add Figure Scroll

I have a plot that can extend beyond the length of the screen depending on the parameters chosen. Using overflow/scrolling options, I have made it such that I can still see the rest of my dashboard when this happens. One thing I have not figured out how to do is fix the legend position so that it remains visible regardless of how far down I scroll.

I know, for example, if the legend extends beyond the length of the plot (essentially the opposite of this problem), plotly automatically adds legend scroll. I was wondering, therefore, if it was possible to do the same for the plot so that the legend remained visible. Would be a nice feature to add!

Figure 1: Legend Visible

Figure 2: Legend no longer Visible

Figure 3: Legend Scroll