Is there a way to make "Close Window Under Cursor (Works in Mission Control)" actually only work in Mission Control?

Question in the title.

This is a very intuitive and helpful feature—it's the default behavior in windows, there's an extension for it in Linux, and even BTT has included it. But it's broken in BTT, it's closing apps even when I'm not in Mission Control, rendering the middle mouse button (or whatever the action is assigned to) useless except as a "close this app" button.

I also tried setting the action specifically only for the Mission Control app, but it doesn't even work at all then.

Is there some black magic script or "advanced condition" I can use to only make it work in Mission Control?

You can add an advanced trigger condition with missioncontrol_active == 1 to the trigger: