I would first approach it by checking the health of the drive with WD Dashboard.
Download, Install, Test Drive and Update Firmware Using Western Digital Dashboard
Other suggestions:
See if changing your power options makes any difference.
Control Panel>
Power Options>Beside your selected power plan select
change plan settings>select
change advanced power settings
Under USB Settings>
USB selective suspend>set it to disabled and save your setting.
Also open device manager. Expand Universal Serial Bus Controllers. Right click on your usb controller>properties>power management tab>
uncheck
allow computer to turn off this device to save power. OK.
If you have the drive plugged into a usb 2.0 port, try changing to a usb 3.0/1 port.
If you have access to another external ssd, test with it in the same port to see if you have the same issue.
Here's an experience I had.
I was having issues with an external
2 tb SSD drive that stays connected all the time. It was a WD, too and kept disconnecting randomly as well as would not be recognized when PC woke from sleep. I would have to unplug and plug every time. I knew it had something to so with power delivery. Changing usb ports didn't help. I tried disabling selective suspend on my usb controller which helped some, but still occassionally it acted sketchy. I ended up buying an externally powered usb hub and connecting the drive to it. I haven't had issues since.
The weird thing is I can connect an external 256 gb m.2 drive to the same port on the PC and it never gives a problem. I surmised the the SSD required more stable power source to be dependable.
Hope one of the suggestions help.