As you can see, we are all pretty much in agreement with you are still obligated to the seller/landlord.
California tenant/landlord law states that you are still obligated to pay your landlord rent. In addition, your 60-day notice rights are not protected once the property goes into escrow. You, at that time, have only 30 days to vacate.
At this time you have knowledge that most tenants in your situation don't have. You KNOW that the home is being sold. Many tenants are being "taken", being told that everything is ok and paying rent towards a property which the borrower/landlord has already defaulted on.
If your landlord is communicating with you, find our if the current offer on the property is from an investor or if it will be owner-occupied. If you want to stay in the property, ask the landlord to advertise it as such if possible. That is often attractive to many investor buyers in the market right now.
Your landlord is responsible for giving the new owner/landlord a copy of your current lease agreement and turning over your deposit in escrow to the owner/landlord to ensure that you receive what's owed to you once you do leave.
If you find that the property is going to be owner-occupied, that's the time to give notice and vacate.
Hope that helps!