The issue is that when applying filters, the list of channels shrink, but the `View2D` isn't updated accordingly.
When you move the viewport, the channels would jump back into view but not before.
The total height of the channel stack is computed every frame,
and the issue is fixed by calling the `UI_view2d_curRect_clamp_y` after that.
Since this has to be done before `UI_view2d_view_ortho` is called, I had to extract
the height calculations into the caller function.
I thought about making a generic function for all 3 editors but they were too different
to meaningfully do that.
I removed the fix that stopped the channels going off screen when using the cursor to scroll,
since the new logic already does that.
Note: while the report only mentions the Dope Sheet, this fix is applied to
the Graph Editor and NLA editor as well since they had the same issues. This PR fixes them all.
Also fixes#46649
Pull Request: https://projects.blender.org/blender/blender/pulls/118006