It’s a good idea
AFAIK that just kills the task, it’s not necessarily equivalent to a graceful “save and exit”.
I use a program created with a windows automation software to automatically “save and exit” WD but it’s very PC dependent so I won’t share it. You could do the same with AutoIt which is free.