I just posted to
another forum about something similar.
You may have a type of shutdown stall that some others report.
It doesn't affect me too much, but I keep caches folders cleaned out, and (because I do varied support, installing a variety of apps that I try out, then often immediately remove from my main system.) often do a full macOS reinstall/reload - probably a couple of times per month.
I don't recommend that others do what I do with reinstalling the system quite often - but, if you have some minor issue, such as odd restart behavior, and you haven't tried a reinstall from a full installer in a few months, it might do the trick of pruning out some issues that you have.
I JUST had a customer's iMac that had a power failure during a storm. Wouldn't boot again, lost one memory stick from that, and the disk directory took multiple runs of Disk Warrior to sort out. It was also an old hard drive (2008 iMac) that had never had any utility of any kind run on it since new. But, the power failure took it over the edge.
There was a lot of time involved for minor problems to accumulate, and the old Mac was working without issues until the storm last week.
Sorry, long story, but I suggest a macOS reinstall (not an erase/reinstall/replace everything, just a boot to an installer, and reinstall as it exists now.), particularly if you haven't done that for a year or two.