I have had similar problems with other programs, typically anti-virus types.
What I suspect is happening and why some systems work and some don’t is, as follows.
On a new system, Avast is high up on the relatively short list of processes to be sent shutdown requests, when Windows is shutting down.
On older systems, it tends to be much further along both in the registery as well as in the process list.
During the shutdown process, windows will close the network connection.
I suspect Avast is saying goodbye to a server or trying to use a network resource that is no longer there and consequently is stopping proper system shutdown.
Just my two cents but…
Jim Brooks