Hi Shafi, This is Ramesh.
This error is usually caused by pagefile or some other immovable file, which prevents the OS drive from being shrunk. Deleting the recovery partition usually helps. However, the best option is to boot into Windows Recovery Environment (WinRE) and convert the disk.
Running MBR2GPT from WinRE will reuse the system-reserved partition.
These guides can be helpful.
Convert an existing Windows 10 Installation from Legacy BIOS to UEFI:
https://answers.microsoft.com/en-us/windows/for...
MBR2GPT | Microsoft Learn:
https://learn.microsoft.com/en-us/windows/deplo...
Note: To access Windows RE, click Start, Power, press, and hold Shift while clicking Restart.
In WinRE, click Troubleshoot → Advanced Options → Command Prompt.
If the Command Prompt option is unavailable in WinRE, use a Windows 10 USB setup disk to access WinRE.