Workspaces are not build specific.
The workspace is reused from build to build when you have regular agents. When more than one agent is able to execute the same project than, it can be that you have on each agent a workspace for different builds. Jenkins might clean unused workspaces after
a while.
When you provision agents dynamically from a cloud and you've set them up to be used just once the workspace stops existing after each build usually.
You should attach important things as artifacts to your builds if they should not be overwritten by the next build.
Also consider that pipeline jobs can use more than one workspace when they run several steps on different agents (e.g. to compile on different architectures).
So there is no dedicated API to check if the workspace exists.