Click outside to close modal not working

I am trying to create a simple interaction where a modal closes when a user taps outside of the modal. I am not sure what I’m doing wrong here, but it’s not working as I expected.

The page is Ads > “Dashboard - Ads”

I have a blur div behind the modal that I’m using to close it. When clicked, it closes the blur div, but not the modal.

I have the same closing interaction for an exit button, and it works fine…

Here is my public share link: [LINK]
(how to access public share link)

Decided to use custom javascript instead.

It shouldn’t be necessary, I looked but couldn’t find the context.