Hi,
The following links might be helpful. Please note that every application or role that is installed on a VM may not be supported by sysprep or generalised image and end up in broken state. If you are trying to prepare a gloden image, I suggest you follow the CIS guide line, Azure image builder is on the way, you can give it a try. If you just want a copy of the existing VM, you can try taking snapshot of the disk and deploy a new VM with them.
Prepare Windows VHD: https://video2.skills-academy.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image?toc=/azure/virtual-machines/windows/toc.json
Azure Image Builder: https://video2.skills-academy.com/en-us/azure/virtual-machines/windows/image-builder-overview
CIS hardened images: https://www.cisecurity.org/cis-hardened-images/microsoft/
Thanks,
Rohan | Azure Architect