I'm going to go out on a limb and define role-playing as taking on a role and responding to situations as if you were that person. You could role-play as yourself, a 17th century samurai from Iga, a lone warrior from Cimmeria, or a stoic Vulcan serving as a security officer on a Federation starship even though your parents are so disappointed in your career choices. I don't know about anyone else who frequents these boards, but I don't have a lot of experience as a 17th century samurai and I imagine they viewed the world very differently from how I view it. But one of the things I enjoy about role-playing games is stepping into a role that's different from my own. Regardless of the setting, when you play a character do you try to take on a role that is different from who you are as a person? When that character deals with something in game do you do what the character would do or what you think should be done? There's no right answers here.
As with many things, for me it depends on the game. When I'm playing D&D, I don't give it a whole lot of thought because the game is designed for characters to have modern western liberal values. But when I play a character born in 1890 I'm not looking for someone with a completely modern 2024 attitude and belief system. Though I'll say right now I haven't got much interest in playing a character that's racist and sexist as was very much the standard in early 20th century America. And I have to acknowledge I'm not quite the expert on the points-of-view of everyone today let alone in our past or in a fantasy setting, so I'm not striving for realism or perfection here. I just like play something different from myself.