To obtain a refund of the Maryland non-resident seller transfer withholding you would file a Maryland non resident Form 505. Line 44 is where you would enter the amount withheld. See Maryland Tax Booklet - Form 505.
You will need to add Maryland as a state in TurboTax and file as a non resident.
**Mark the post that answers your question by clicking on "Mark as Best Answer"
I moved back to Maryland in December of 2019. Therefore, as of right now, I am filing as a part-year resident for both Maryland and Pennsylvania. Does that make a difference?
No, part year resident won't matter. MD conforms to the federal home sales exclusion rules.
But, tax will be assessed on the rental portion of the capital gain (the depreciation recapture).