If the connected drive shows up on MacBook but the files disappear after a while, there may be some connection issue. You should check the connection between the WD drive and your Mac. To avoid unexpected data loss, back up your drive if it is possible. If any data loss happens, try iBoysoft Data Recovery for Mac to recover ASAP!
You should be able to access the connected WD drive on your Mac, however, the files vanish from the attached drive after a while, it seems that the connection between the WD drive and the Mac is unstable. After reconnecting, the same issue occurs again, perhaps the external hard drive keeps disconnecting on Mac.
To troubleshoot this issue, you should first check the connection, including the USB ports, USB cable, and USB hub, and make sure all the parts related to the connection are in good condition.
If you are sure the connection is not the problem, does other storage media plugged into your Mac behave normally? If your answer is yes, it seems that the WD drive is corrupted, you can repair corrupted external hard drive on Mac with Disk Utility's First Aid, FSK command, reformatting, etc., and you'd better recover data from the corrupted drive to avoid data loss caused by further operations. Free download iBoysoft Data Recovery for Mac to recover data Now.
In case other storage media also performs abnormally on your Mac, it may result from software bugs. You can try to update macOS to the latest version to see whether it works to solve the malfunctioning external hard drive issues on Mac.