Hello Aakarash,
I have tried on a vanilla environment and found the following on UCI:
If you select 2 cases, 1 Canceled and 1 Active the dialog box will show up, but it should not let you merge both records.
If you select 2 cases, 1 Resolved and 1 Active it will let you merge both records and the record it was resolved it will become 'Cancelled'.
This is supposed to work only with Active Cases and not along with Active and Resolved as the documentation is mentioned.
I will bring this discussion internally for this behavior to be reviewed and will let you know later what we conclude.
Thank you for raising awareness of this.