This is an issue that has divided nerds since time immemorial.
I think it comes down mostly to two things: 1) lots of options for different ways to craft your character/playstyle, so your build is very different than someone else's and has different options to handle situations (e.g., guns vs. stealth vs speech) and 2) choice & consequence within the narrative (i.e., branching paths). I'm sure people can point to exceptions (e.g., RPGs that don't feature any choice/consequence in the narrative), but those are the two elements that stand out to me.
Zelda and GTA aren't considered RPGs because they don't have much of the latter, whereas Cyberpunk does.
The boundaries have been blurred for a decade or more
gachaneb, though, because nearly every game has "RPG elements" of some sort.