The spell description reads:
Alternatively, the spell can locate the nearest object of a particular kind, such as a certain kind of apparel, jewelry, furniture, tool, or weapon. This spell can’t locate an object if any thickness of lead, even a thin sheet, blocks a direct path between you and the object.
If I were to find, say, a silver piece and I found one indeed, but then I moved in a way there were another silver piece in the spell range, that were closer than the one I detected, would I locate the latter one, or would the spell be, so to speak, locked on the first detected target?