This is expected behavior. When user have not submitted initially, then dirty prompt is provided to confirm that he might loose the data. Since user have submitted the form once and knows that there are errors and ideally he will fix the errors and submit the form again.
Do you have a particular business case that would help us in understanding why user is submitting and closing the case ?
There is a dirty check attribute that decides whether to prompt for confirmation message. I am assuming that is getting reset after submit since the WO is not dirty anymore. If you can find a way to set that attribute, this issue could be solved. I will also try out the same and let you know if this solves the issue.
Sorry for late reply. I did try the same today and it worked.
Below is the flag and code that you can put in UserWorkForm.
pega.u.d.gDirtyOverride = true;
You can call this function by using Run script UI action from Close button action before actually closing the WO so that it will reset this flag. But you have to make sure that this is only reset if there are errors in WO (you can pass a parameter to this js function).