In Windows 11 you can attach a VHD and keep it’s mount state after reboots without having to manually set up a scheduled task or automount process.
VHDs created or attached in Disk Management will not mount after a reboot.
However attaching a VHD in Settings > System > Storage > Advanced Storage Settings > Disks and Volumes in Windows 11 will automount on a reboot.