Merchants have direct control over their return & refund policies. If the merchant has refunded you directly to your card, or via store credit, your Afterpay instalments will still need to be paid because the merchant has paid you back directly.
If you would like to discuss this further, we would recommend reaching out to the merchant. It is important to note that Afterpay cannot override the decision that a merchant has made in line with their returns policy.