This issue is not consistent and is not directly related to Proxmox. The Shutdown button on Proxmox's GUI only sends an ACPI signal to a virtual machine to initiate the shutdown process.
Once the VM receives an ACPI signal, it starts the shutdown process. However, if the VM has a number of processes running in the memory, it might take a while to end processes before shutdown. The ending of processes may take longer, which causes Proxmox to issue a timeout error. The issue may occur for both Windows and Linux. The workaround for this is to access the VM through a console or SPICE and then manually shut down the VM.