HSA distribution in 2021 that was partially refunded in 2022

Hello,

My daughter was hospitalized in late 2021, and the "finance lady" came around to her room to collect payment from me. Not understanding how "the system" works, I paid them out of my two HSA accounts. Turns out they just demanded the remainder of my out of pocket maximum for the year (around $5500) and I was too upset and naïve/stupid to say no or to negotiate a reasonable payment amount.

I thought the hospital would apply my up-front payment to the actual bills, however they only kept around $1600 to cover their first invoice, and refunded the rest back to my two HSA cards in January. Then they sent me an additional invoice for around $1300 at end December, which I paid in January (but not directly out of my HSA).

Problem is that the payments were in 2021 and the refunds that came directly back to the HSA accounts occurred in 2022. I now have a hospital statement to cover only $1600 of the $5500 that was disbursed in 2021 (even though the remaining $3900 was refunded back to my accounts in 2022). I called both HSA banks and they both said they could not apply the reimbursements back to the 2021 tax year.

I'm totally lost on how to handle this for 2021 taxes. Do I now have to report the excess hospital payment of $3900 as a personal distribution for 2021 (incurring income taxes and penalty), even though I got the money back in 2022? I do have receipts from the hospital for the payments totaling $5500 in 2021, but an itemized statement for only $1600 against that payment. My 1099-SA includes the full $5500 in the "gross distribution" amount. 

Looking forward to some advice, if anyone can help! Thank you!