First of all, IDK if you're using the latest version of MyAlerts here or not. Second, I'll likely be adding this code snippet to the next version but I'd love to see it manually added here in the meantime. I can't believe I overlooked it.
https://github.com/euantor/MyAlerts/wiki/Closing-the-alerts-popup-when-clicking-outside
https://github.com/euantor/MyAlerts/wiki/Closing-the-alerts-popup-when-clicking-outside