I have a WD My passport 4 tb formatted to APFS. Product Number WDBBYF10040BBK-0A
It is connected to a Macbook Pro 13" mid 2012 with MacOS Catalina.
Quite often, I will connect the external drive and then the folders will all show up. Then in a few hours, when you look at the folders again, almost all if not all folders disappears. Then when I try to eject it, it will say it needs to be force ejected.
After force ejecting and reconnecting it again, all folders show up again.
What filesystem is your external hard drive formatted with? I would suggest you copy all the data from an external hard drive to your Mac. Once the backup is taken go to Disk Utility and repair the drive. After disk repair, see if the problem is fixed. Otherwise, erase the drive again with MacOS Journaled, APFS, or exFAT (if you want platform independence)
Just FYI. I have installed WD Utilities. It somehow tries to recognize the hard drive and once in a while it will do some background process. But I think that’s the reason why folders disappear.
Once I removed all WD related apps, the disappearing folders seems to not happen anymore.