Recent versions of Windows 10 (and now 11) have a pause updates feature that lets you prevent Windows Update for a period of time.
You could also write a script that checks if a pending reboot is detected, do a clean shutdown of your VM and execute the reboot. See
https://stackoverflow.com/questions/...pending-reboot