You can’t merge duplicate cases pending in an Omni-Channel queue or assigned to agents with an Opened or Assigned status Exception is a known limitation in Salesforce Omni-Channel.
Reference Article:
https://help.salesforce.com/s/articleView?id=sf.cases_merge.htm&type=5
1. If the Case to be merged is in Omni-Channel and not master, we will get this exception. So, keep the Case to be merged as Non-Omni and keep the Omni routed Case as Master.
2. We can merge the Omni routed Cases if the Case status are not in “Values for In-Progress” statuses.