Hello Patrick,
at first you have to enable "keep depth maps" in Metashape Preferences/Advanced tab, then the depth maps are stored in project file. So these kept depth maps belong to those photo which are used for their generation even if you change path to different photo set afterwards.
Hope that answers your question.
Kiesel