This is gonna be an overview of the process which I completed a few months ago. It doesn't require spending money on commercial software just a bit of fiddling.
I haven't investigated recently but last I looked VirtualBox doesn't support APFS or booting from APFS. So that is part of the problem. Maybe it has been fixed in the last few months, I don't really know.
Download a (free) copy of VMware's virtualization software Fusion. It's free to use for 30 days. No worries there as this procedure will take a lot less time than that.
There are a number of "Making a macOS VM in VMware Fusion" web pages out there so I'm not going to go into all of that, but there are some non-obvious settings you will need to find to make this work. I used this. There are others.
Once you have macOS Mojave working in VMware Fusion you create a second virtual drive and using Disk Utility on the just created VM, reformat virtual drive 2 as HFS+. This is important as it's APFS by default. It needs to be HFS+ to work with VirtualBox.
Once formatted you can use a backup program like SuperDuper! or CCC to clone the working installation to Virtual Drive 2. If you prefer you could just install Mojave onto Virtual Drive 2 (HFS+). However you do it, you will end up with a VMware Fusion VM with macOS Mojave bootable on two virtual drives. One formatted as APFS and one formatted as HFS+.
Now set Fusion to boot off of the HFS+ virtual disk and boot from it. Then you just delete the original (APFS) virtual disk from within Fusion. Actually delete it from disk don't just remove it from inventory.
Then you open the Fusion virtual machine file like you would an .app package (right-click > Show Package Contents...) and copy all the files out of the package into a location you want to use for VirtualBox VMs.
VirtualBox will then open the VMware Fusion VM.
It is a bit of a PITA but the trick is using Fusion as a stepping stone to VirtualBox via an HFS+ bootable drive image.
I don't think this will work with Catalina as the guest VM. That pretty much requires APFS and Mojave does not.
Oh and you can trash VMware Fusion now...