馃悰 Intercept the application's window closing event to ensure using the clean app closing method (which includes unregistering the instance)