@Andreas Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused. It is good enough if it is a VM that you want to create using disks whereas "Generalizing" and "Deprovisioning" is done when you want to create a golden image which will be used to create subsequent VMs.
VM agent will continue to work as expected as it is not dependent on the User related settings.
Generalize the Windows VM using Sysprep: Sysprep removes all your personal account and security information, and then prepares the machine to be used as an image. For information about Sysprep, see Sysprep overview
https://video2.skills-academy.com/en-us/azure/virtual-machines/windows/capture-image-resource.
Kindly let us know if the above helps or you need further assistance on this issue.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.