Inspect the layers
Highlight the shared area between the two people during the crossover. Make one controlled output for each stacking order using the same source frame.
Inspect the object that should be in front, such as a forearm crossing a jacket. Compare the overlap with its neighbors outside both mattes.
Controlled edge example
Two half-covered grayscale layers at 200 and 40 over black produce 110 with the brighter one in front, and 70 with the darker one in front. The difference comes from compositing order.
Which part of the composite to repair
Animate the ordering or split the crossing when real depth changes within the shot. Replacing both references again will not correct a composite assembled in the wrong order.