The SHUTDOWN command does not have the capability to tell applications to save data and close.
You can use “/r” for reboot which will trigger open applications to prompt to save data and not reboot if the applications remain open.
Adding the “/f” will force a reboot but cause potential data loss because it forces applications closed without saving data. A workaround is to have applications that save recovery information or autosave in the background. Not always a good solution.
The issue with telling an application that has changed data to save the data is what to do. In the case that no save file has been created how does it know what file name to use and where to save? In the case where the changes should be discarded instead of saved how will it determine that? In the case that changes just need to be saved how will it know that?
There is no good best solution for running applications with open files. Not leaving files open with unsaved changes when you leave the computer provides decent protection. Then a reboot will not usually loose data.
The best possible solution is when you leave nothing open because you know a reboot is scheduled.