You may use the Admin Console
to check for your deleted Shared Drive
through this link. It will be on the very right side so you'll need to scroll to it.
Note: From what I have experienced, deleted shared drives will be on this page for up to 25 days
.
You should be able to get SharedDrives ID
through the Method: drives.list API.
But for some instances, the API only gets shared drives that are active
and not deleted. With this, you may submit a Feature Request
on this link to inform Google about this
issue.