Hello and welcome to JustAnswer. Please note: This is general information for educational purposes only and is not legal advice. No specific course of action is proposed herein, and no attorney-client relationship or privilege is formed by speaking to an expert on this site. By continuing, you confirm that you understand and agree to these terms.
I am sorry to hear about this situation. Well, technically the owner is selling the property and all its interests and thus the new owner steps into the shoes of the landlord, meaning that they would then have to honor the lease and allow the tenants to finish it. The rent would have to be paid to them. This is called an assignmentship - an assignment of the contract to a third party (in this case, the new landlord).
There is the Tenants' Rights and Required Notices (Md. Code Ann., Real Prop. §§ 7-105.6, 7-105.9, SB 516). This mandates that the new owner to send the tenants a 90 days notice to relocate once the new owner takes ownership of the property after a foreclosure. But this is for a foreclosure, NOT a short sale.
I hope this helps and clarifies. Please use the SEND or REPLY button to keep chatting, or please RATE when finished. You may always ask follow ups at no charge after rating. Kindly rate my answer as one of TOP THREE FACES/STARS and then SUBMIT, as this is how experts get credit for our time. Rating my answer the bottom two faces/stars (or failing to submit the rating) does not give me credit and reflects poorly on me, even if my answer is correct. I work very hard to formulate an informative and honest answer for you; please reciprocate my good faith with a positive rating.