I have an external hard drive that is APFS encrypted, but I also tested this with an APFS drive that is not encrypted.
Simply put, I mount my hard drive, view some files via quicklooking (press space on the item) or launch them into VLC, then eject the drive. There is a catch, and that most of the times I do this, I have to force quit all quicklook tasks via activity monitor. The error actually just says it's being used (doesn't say what task) and gives me a prompt to wait, cancel, or force eject.
So, how can I make it so quicklook isn't always preventing my hard drive from ejecting and 'yank it out' preferably shouldn't be a solution. None of the files are applications, but dmg files that I look through, and yes; I've ejected everything or closed every window before ejecting the drive.