You can try the following additional steps:
Check the system requirements for upgrading to Windows Server 2022, such as the minimum hardware requirements, supported virtualization technologies, and processor architecture. Make sure that your Azure VM meets all the requirements.
Disable any antivirus or security software temporarily to eliminate the possibility of interference during the upgrade process.
Try to upgrade the Azure VM using an ISO file instead of the online upgrade method. You can download the Windows Server 2022 ISO file from the Microsoft website and attach it to the Azure VM.
Check the setuperr.log and setupact.log files in the %windir%\Panther directory for any specific error messages related to the upgrade process. These log files may provide more details about the issue and help you identify the root cause.
If the issue still persists, you may consider creating a new Azure VM with Windows Server 2022 and then migrating your data and applications to the new VM. This approach may take longer than an in-place upgrade, but it may be a more reliable and efficient way to upgrade your VM.