Issue with dynamically hiding modals

I’m having a bit of an issue with the Bootstrap 5 dynamic modals. I am setting a “Hide” dynamic attribute for a modal where the condition is based on whether a variable has a value.

The expression works fine and the modal disappears as expected, but the overlay backdrop remains and nothing under it can be clicked. Setting the modal so that it has no backdrop results in the same issue (just without the backdrop overlay)

Can you please post some screenshots showing how is your modal setup exactly?

I think you may be confused. To hide a modal you don’t use the hide attribute, you use a hide modal event. For example, if you have a modal with ID modal_test you could have an on success dynamic event on a form that closes the modal with
modal_test.hide()

The modal has a show attribute only, not hide:

So if you want to show it when a variable has a value use:

To hide it when the variable has a value, add a ! in front of the expression, like !var2.value