UE 4.27 How to Show Confirmation Widget On Game Window Close

How to show confirmation widget when user tries to Close the Game window with Cross Button, when game is running in window mode…

On my packaged Window Project, When I Close the game window It closes the application Immediately , but I want to save some variables before user closes the game…

I got two solutions already , Like adding Quit Game button But there is no guarantee user will quit game using Quit Button, Other is removing the cross button from game window But I also don’t want to do that…