yeah, there is another thread in the *A forum with similar issues on AC miles. This is reported to be a mess. I would try and Email
[email protected] with the PNR and date the miles were deducted for the upgrade as well as a confirmation that the flights were cancelled and the ticket refunded. They should be able to refund those miles, but it might take a few attempts and escalations since *A upgrades are not exactly common for most agents.