gemmas a work-around i think you can windows-tab which will show all windows open, then move tf2 onto another monitor or onto another virtual desktop (windows 10) which will then let you click on task manager
This has worked for me
Also if I type "exit" into console instead of "quit" TF2 doesn't encounter that problem but your mileage may vary
Edit: I'm having the same problem if I type exit so yeah that sucks