DuplicateRecordItem rows not available in Apex
|Knowledge Article Number||000240380|
|Description||DETAILS AND STEPS TO REPRODUCE
|Resolution||Do not attempt to use DuplicateRecordItem to validate if duplicates were inserted in the same transaction, as it does not give the expected results.
Similarly, do not use it in Apex Tests, as for the same reason it results in no rows.