When does it stop being dnd?

Alright so. I just have a question. Is it still dnd if the game isn't set in a fantasy setting or is based on a book/movie but the rules stay similar?

I'm not really sure how to form the question better I'm tired and English isn't my first language but I hope it's understandable :)