Alt + F4 currently closes the desktop app completely. Could it instead minimize it to the tray?
When you use Alt+F4 or right-click the app on the taskbar and click Close, it closes the app completely. The icon disappears from the system tray. If possible, could there be an option to minimize to the system tray instead of closing? To exit the app, you would close from the system tray instead.