Hide dynamic pannel depending on the position of the scroll

Use the Window Scrolled event with a conditional case that tests the [[Window.scrollY]] property (a built-in value showing the amount of vertical scroll in pixels) against the y-location of your “another” dynamic panel widget (use [[LVAR1.y]] or [[LVAR1.top]] where LVAR1 is a “local variable” pointing to that dynamic panel.

Here is a relatively recent thread showing a solution for this:

You can also search for “sticky header” in this forum as that is a classic use of this experience.