How to clear/reset Alert in Modal

I have a submit form in a modal which works and on success shows an Alert above the form in the modal.

When i click away from the modal and then show it again, the alert is still there.
Pressing the Close button does remove it, but not clicking away.

I tried modal.update action on click before Showing but that didn’t do it.

any ideas?

On modal hide dynamic event, you can do “alert.hide()”

Turn off the alert auto show. And on Modal Dynamic Event > Hide > hide the alert.
Only set the alert show event from the form on success event.