if Application.wantsToQuit return false but the OnApplicationQuit also will be invoked

When player close the game, I want to do something before the game exiting like save the game data.So I register an function into “Application.wantsToQuit” and return false to prevent the game exiting. It works well. But even the function in “Application.wantsToQuit” return false and the “OnApplicationQuit” event also will be fired.Some plugins used “OnApplicationQuit” event to release some resources. When onApplicationQuit has been fired but the game doesn’t exit. I prevent it. During the game exiting some plugins work on error status.How I should do and avoid this problem?

I am seeing the same behavior and I have filed a bug report on it (Case 1260583). It seems (to me) like calling OnApplicationQuit before the wantsToQuit handlers is the exact opposite of the desired behavior.