Dup Check function not working in Demographics form

In the last versions, 5.0.0 and 6.0.0, Dup Check function does not work. It works in new patients, but not in old patients that have their data edited. The most common field that needs dup check is the SSN. There are 3 options: Dup Check, Dup Check on only Edit and Dup Check on only New. The only one that works is Dup Check on only New.
Does anyone know how can this be fixed?

@sergiors I have checked function it is working fine

Hello. In the demo at https://demo.openemr.io/a/openemr/ I used the Dup Check options for SSN and External ID, and I edited the first 3 patients to add number 1 to both fields. None of them rejected the change.