Depth of Field and Depth Pass problem
Depth of field requires a bit of knowledge to make it work to your advantage, as it is the combination of many factors:

Lens size

Sensor size

Focus distance

Aperture of the iris ($f$ stop)


Depth of field is not an absolute term, but is relative to the size of the final image, and there is also a subjective factor as it is usually defined by &quot;the area where things are acceptably sharp&quot;, based on the size of circles of confusion
What you need to find is a combination of lens, distance and F stop where the elements you want are in focus and the rest is not.
To have a smaller area that is sharp and selective focus, a trick is to use a much larger sensor size than the default one, which will force you to use longer lenses to keep the same field of view. Longer lenses will have a shallower depth of field.
To find the right combination there are quite a few online calculators for depth of field, use your favorite search engine to find one that you like.
There is an addon for blender, developed by @p2or, to visualize the depth of field in blender. Read:
How to display F-stop limits in viewport?
I don't know if this works correctly in current versions.
Additional links:
(https://en.wikipedia.org/wiki/Depth_of_field)
How do I set focus range?