I don't think it is a good idea trying to implement this behaviour. It is good that you think about your users accidentally deleting something. However, I have not encountered this problem.
The major point not to implement this is because it is unexpected behaviour. No software does this and it is more likely a point for user frustration instead of helping them. Maybe they have switched to another program shortly, e.g. a chat or similar. Your window is still (partially) visible and they want to get quickly back to work. So, they might be clicking your button on purpose, but nothing happens. They become frustrated because their (maybe fast) computer is too busy to register the click (at least in their perception). After a few seconds they notice that actually nothing happened and they click again. If this only happens for some of your application's buttons it is even more confusing. Maybe they actually figure out that clicking buttons in your application when it wasn't in focus requires two clicks. But, you haven't implemented it for all your buttons. Then the user clicks one of the buttons which does not support this behaviour twice as they have learned it. Suddenly, they have triggered the action twice. You cannot expect any user (other than yourself) to understand this.
The potential problems I described above are magnified when someone has a multi-monitor setup with your app fullscreen on one of them.
Try to stick to user interface guidelines to not annoy your users.
I believe that users are trained to subconciously not click on buttons to bring an application back into focus.