WD My Passport intermittently not recognised

Hi I am new to this community and seeking some assistance. I have a WD My Passport 1TB external portable hard drive. I have experienced problems recently with the drive initially being recognised on my laptop and my PC and after a period of time the drive disappearing and being no longer recognised or shown in disc management. When the drive disappears the drive light stays on and the drive is still spinning but just not recognised by the my laptop or PC. When the drive is undetected if I disconnect and leave it for a period of time say 30 mins and then pug it back in it normally shows up again. Despite this problem when the drive shows up all data is present and accessible until it drops out again. I have the WD drive diagnosis tool and no problems are detected, I have tried different cables thinking this might be the problem but it makes no difference and the same above mentioned problem persists. This is really frustrating and I would appreciate any ideas anyone has for a solution to this problem.

Have you tried to use this device on another computer? And are you facing same issue with another computer?

If the issue remain same, you should run Drive Test using WD Drive Utility to check the health of the drive.