Welcome to DTP, jen86. You are not alone in dealing with the upset of your granny not knowing who you are, my granny was never diagnosed with dementia but some days she didn't know who I was although she seemed to recognise me as someone familiar. It is hard, and of course you want to still see her and support her.
Does your grandma have anyone else who visits like carers to help with daily tasks?
You will find a supportive community here, where everyone has experience of dementia, so keep asking and offloading.