Had an apartment sold out from underneath me also as a young man.
Pretty painless at the time, as I had little and could easily move. However others in my building did not have that option (larger families).
I have been a tenant too, a model one and got ripped off by the landlord back in the eighties because I didn’t familiarize myself with “30 days written notice” despite the LL knowing I was going to move verbally and in fact had me act as his rental agent taking numbers for the new tenant.
He kept my entire security deposit (the apt was left immaculate). Lesson learned. HOWEVER this is the pendulum swinging violently in the other direction.
I have one duplex just remodeled all new everything including mechanicals and one that is being rehabbed now. I might turn around and sell it if it gets much worse.