Drag the "PageVisibilityListener" block to your screen and define an event handler to the VisibilityChange event to apply the logic according to the visibility flag.
Alternatively, check the current state of a page by calling the "Page_IsVisible" client action directly in your flow.
Drag the block to your screen and define an event handler to the VisibilityChange event to apply the logic according to the visibility flag.