Assuming you have positioned your cameras appropriately, in such cases, if the two identities are distinctly similar to each other, or in cases where the two identities are identical twins, validate both identities to avoid interference such as identity overlap.
If your cameras were previously poorly positioned and if face recognition was enabled, your Directory could be populated with low-quality identities. Try to avoid working with these identities.
The best practice would be to erase all identities that have accumulated during the period of bad camera positions, and when the person of interest reappears in front of the camera and his identity is re-created, that newly created identity should be used.
If you still have problems, you may want to check out the following articles: