One of the most influential books I ever read was About Face by Alan Cooper. What he said about this bad modal dialogue is that you should simply not ask the user, and let them undo later.
This was heresy at the time, but turned out to be the native user flow for iOS later on. And now it's common in web apps.
https://www.amazon.com/dp/1118766571?lv=shuf&channelId=500&p...