So after updating to the next version, it is picking up the right primary key. We were using 22.19.0 in which the primary key was _cq_id and moved to 23.0.0 which has resource_arn as the primary key. This is solving our issue.
I would suggest migrating to v24.x because that version we switched how we are doing Primary Keys. Rather than having composite PKs, we are using a deterministic hash of multiple columns as the PK. This means that we can fix PKs without having to release a breaking change.
For example, yesterday AWS announced cross-account sharing for Parameter Store resources, which would have required us to release a breaking change to update the Primary Key. But now we could do it as a minor update.