I wasn’t able to reduce the file size of my Linux disks on Hyper-V through the build in compact function of Hyper-V
In order to compact your disk run the following command on the Linux install
sudo fstrim -v
Shutdown your Linux install
Compact your disk
Credit: https://helgeklein.com/blog/2016/11/faster-trimming-compacting-hyper-v-ubuntu-vms/