If you can prove that you've been her care-taker for 2 years prior to her need for Medicaid, I believe there is a program/waiver or some such thing whereby you can apply to keep the property. There are other threads here where this is discussed. Maybe someone else can weigh in.
See an elder law attorney pronto. If you haven't set up a trust or a joint tenancy years ago, yes the house is at risk after she dies. But you say you have lived with her for 8 years. You may qualify for the child caregiver exemption. I started a thread about it in the last day so check that out.
https://www.agingcare.com/questions/how-to-document-have-been-and-are-a-caregiver-for-medicaid-434997.htm