That particular functionality worked fine on Mojave.
It works fine as long as I keep my VDI files on my system drive, but that can be a pain since they're so large.
We're stuck in a situation where fixed-size disk images are too large to use if you care about your host's disk space (unless they're created with an "almost full" target usage), and dynamic sized images tend to grow to unwieldy sizes unless you regularly zero-out empty spaces from the guest (cat /dev/zero >somefile on Linux, sdelete -z C on Windows IIRC), then VBoxManage modifyhd --compact the image from the host once the VM is off.
But it shouldn't be this way. VirtualBox added support for TRIM years ago, and guest OSes could very well happily live inside dynamic images - if it worked at all.
In practice (AFAIK, for the few who ventured to use it) - it doesn't work: