The merchant would have to stop the refund or the receiving bank would have to reject the refund. Apple Pay is just an extremely secure pipeline that sends encrypted data to keep your payment information and personal information private. Apple is not the merchant or the bank and plays virtually no part in the transfer of funds.
Just an FYI, if the account is closed and is not in negative balance, the funds will be returned to the merchants bank. The process generally takes 10 to 14 business days. If the closed account has a negative balance the transfer/refund will be applied to the negative balance and if there is any additional funds, they’ll be returned to the merchant’s bank. This process can be extended because the amounts are different and the merchant and their gateway (credit card processor) has a mismatch of refund amounts.
If the later occurs, you’ll need the ARN (Acquirer Reference Number) from the merchant to track the refund as it goes through the system. Apple does not have access to that information. Only the merchant has access to the ARN.