performDefaultImplementation of an AppleScript is not called while a menu is open

Apparently, the call to performDefaultImplementation of an AppleScript is called on the main runloop with the defaultModes only, so it is not called while a menu (or contextual menu) is open.

This is very unfortunate as it means the execution of these scripts is delayed until after the menu is closed.

Looking for a way to change this behaviour but I have no clue how...

Thanks !

Daniel