Product: Credit card or prepaid card

At approximately XXXX XXXX on Tuesday, XX/XX/2021, I checked my XXXX email. I noticed an email from XXXX XXXX ( XXXX ) titled XXXX Order Confirmation. The email stated that it was an order confirmation for a yearly subscription that had been placed on Monday, XX/XX/XXXX. I called the phone number listed. I was told that they would refund the subscription amount to me. I was sent a link and asked to download a program called XXXX. The subscription amount was refunded. As a security precaution, I was instructed to state how much had been deposited into my account. Instead of {$250.00}, there was {$5200.00}. I was told that I must return the {$5000.00} that had accidentally been deposited into my account. I purchased ten {$500.00} gift cards from a local home improvement store with my Capital One card at XXXX XXXX. I read the card numbers and the accompanying PINs to the person over the phone at approximately XXXX XXXX. 
By XXXX XXXX I realized I was the victim of a scam and went to my bank. I closed my checking and savings accounts and opened new savings and checking accounts. While waiting for the paperwork to be completed at the bank, I called Capital One to report the scam. I was transferred to the fraud department and told the woman my story. She closed my credit card account and issued me a new card and number. We discussed any issues I might have with the old number, automatic bill pay, recent purchases, etc. I said I would update all of my automatic payments myself. She assured me that she was denying the {$5000.00} charge and that no new charges from my old card would be honored. In fact, she said I was so smart to use my credit card for the purchase. It had been less than 24 hours, the post was still pending, and that I had caught it in time. After I hung up, the bank employees told me the same thing about using a credit card. The bank manager told me that I should consider filing a police report. She said it was the only way to catch these people, but understood why some people didnt report it. 
I checked my bank accounts and my credit card account often over the next few days. I noted the {$5000.00} charge had been denied.I wanted to put this incident behind me, so I did not file a police report at this time. I did not consider, nor was I instructed to contact the store where I purchased the gift cards. 
On Friday, XX/XX/XXXX, I logged into Capital One to pay my bill. I saw that the {$5000.00} charge had been resubmitted XX/XX/XXXX, and was payed. I called Capital One immediately. Their representative XXXX told me that an investigation had been conducted and it was determined that no fraud had taken place as I was the one who bought the gift cards. I received no communication about their investigation, nor their conclusion. XXXX told me that I needed to cancel the gift cards with the home improvement store where they were purchased, and file a police report. I was told that I have 60 days from the posting date to dispute the charge. 
I am disputing the charge by Capital One for {$5000.00} for a purchase that I made under duress and fraudulent circumstances and successfully cancelled four days prior to resubmission and payment.