In general, you are only required to file a tax return and pay taxes where you are a resident. Since you are residents of MD, but had tax withheld in DC, your wife should have filed a form DC-40B non-resident request for refund. And in fact, if she had DC taxes withheld in 2022 (before you fixed it), she should file a D-40B instead of filing a full year DC return. See page 7 here.
The problem is for past years. Did you ever file a DC return for 2021, 2020, etc. either as a resident or non-resident? Or did you just let the DC withholding evaporate?
If you filed a DC resident or non-resident return, you would have to file amended returns showing zero DC-taxable income and claiming a refund. If you never filed at all, then she would file a D-40B for each past year where she had withholding but was a non-resident. You will have to look for the correct prior year forms on the DC tax web site.
Turbotax can't e-file form D-40B. You will have to print and mail it. A paid professional might be able to e-file the form, but ask before you pay any money so your money isn't wasted. It might not be e-filable at all, since you have to attach certain proofs.
My guess is that DC uses the same 3 year statute of limitations for refunds. So a D-40B claim for refund for 2018, which was due April 15, 2019, will now be more than 3 years overdue and no refund would be paid. But tax years 2019, 2020 and 2021 are within that 3 year deadline.
presumably taxes which were withheld from her paycheck went towards paying DC taxes
Don't presume. Her W-2 shows where the withheld tax went. Does box 15 on her W-2 say DC, or does it say MD, or something else?