If you have a Shopify store, Refersion has a tool to help negate the affiliate's commission for returned orders. This way, you are not paying affiliates a commission for orders that were returned by your customers.
If you are not on Shopify, you can always issue a Manual Credit to adjust for the return.
For all business owners, regardless of e-commerce platform, it's best to hold all affiliate payments until the end of your return period. This way you have time to review all commissions earned and then pay only the ones that are valid orders that have not been returned or canceled. Some common affiliate payment schedules are once a month or once every 45 days to accommodate a 30 day return period.