There's a script trigger you can set on the Tab control: OnPanelSwitch.
The script performed by this script can use the value returned by Get ( TriggerTargetPanel ) to detect that the user has just selected the panel in question. It can then set a value in a global variable referenced by the Hide Object When property in order to hide the layout object. This will also need a refresh object step that refers to the object name of the layout object once the value of the variable has been set by the script.
Alternatively, you could use the GetLayoutObjectAttribute ( <
> ; "isFrontTabPanel")
Yes that would work, though I think you'll still need the Refresh Object script step to update the object's visibility.