It depends on the circumstances. For my projects (all DOS-based), I use 86Box and DOSBox-Staging for compatibility testing, but the former lacks an easy way to get my test files into the system - in DOSBox I can use a shared folder, and in a Win98 VM I can mount my NAS directly and grab files from there. In a DOS environment in 86Box, my only solution is to take the files from my main development system, create a floppy disk image in a XP VM, pop that into 86Box, and then copy the files to the correct place.
Not having access to 98 VMs in VMWare was a big enough deal that I almost considered sending back my Ryzen 3900X - I use it that much and it completely messed up my workflow. I ended up settling with using an XP VM (which has 'close enough' compatibility via NTVDM) and using DOSBox-Staging for most of my testing. If I want to test on accurate hardware, I just plop it onto my 486 (well, at least when I have it hooked up, anyway).