Overpaid the IRS by accidentally submitting two amended returns

I submitted my tax return and got it accepted and I got money back in Feb 2023. I realized I did something wrong and amended the return and it showed I owed some money back (I got $3k but owed $1700 back from that). I set everything up for it to come out of my bank account and submitted the amended return 4/9/23. Well, I accidentally submitted the amended Federal return twice (again on 4/10/23 when trying to submit my state amendment). Both federal amended returns were reviewed and both have been accepted/approved and both times they took $1,700 out of my bank account. So now, I'm $1,700 in the hole and the IRS owes me that money back. I tried calling Turbo Tax to figure out what to do. No luck. I tried calling the IRS and went through the prompts in regards to the 1040-X but they said they had no info about it. It's a tricky situation because it's an amendment and it was submitted twice. Help!!