Does the excess amount (ineligible) stay in my HSA a/c after I file amendment for 2024 tax to pay 6% tax since I can't withdraw the excess after I have filed my 2024 tax?

I just found out I can't contribute to HSA as I am enrolled to Medicare Part A since Feb. 2024. I'm making the amendment for 2024 Tax. Turbo Tax says "You may want to withdraw money from your HSA" before 4/15/25. Since I can't withdraw it now and to pay 6% tax, does that mean the excess amount stay in my HSA?