ok Ive been researching this for a few months now. My mbp hangs on shutdown, meaning it reaches as far as the black screen but the keyboard is lit and its still warm. Actually itll get super hot if I leave it like that. I have to press and hold the touchbar touchID button until the keyboard turns off and the mbp really OFF.
When I turn it back on i get the warning that it didnt shut down properly and asking if I want to reopen last used programs. I click ok and it opens up nothing, because I have made sure there is nothing running. I go to the Force Quit menu and make sure before shutting down.
Anyway, Ive noticed its almost always related to when I use iMovie in my session. Not everytime i use it, but at least 8 out of 10 times. And Ive had this mbp for 2-3 yrs and it never did that until last year when i started editing videos in iMovie.
Ive reset nvram and what not, but thats not a solution. Ive managed to save a list of the running processes when it hangs and when it doesnt hang by going into Activity Monitor before every shutdown and saved it as a txt file but I dont know what Im looking for to be honest.