Hi,
Thank you for posting your query.
Kindly follow the steps provided below to resolve your issue.
Use this article to troubleshoot issues you're having with the VHD Disk Compaction feature
Go to this link for your reference and other troubleshooting procedures https://learn.microsoft.com/en-us/fslogix/troubleshooting-vhd-disk-compaction
Do not hesitate to message us if you need further assistance.
If the answer is helpful kindly click "Accept as Answer" and up vote it.