Function to detach and restore focus properly
Fix focus issue with restore game dialog