The term "roleplaying" has been long an overloaded term. You can play a Lone Wolf or Fighting Fantasy game book, or a campaign of solo Tunnel & Trolls adventures, or play an RPG with a gaming group, or a computer game, and we call it "roleplaying". Just as people think of "D&D" when they hear "tabletop RPG", however, it seems that many people think of "tabletop RPG" when they hear "roleplaying". I personally prefer a broad scope to the term "roleplay", and I assumed that most gamers had a flexible definition for it. I was a little surprised when I told my gaming group that I was playing a roleplaying game by building and painting miniatures, and then had to explain to them why I count that as roleplay. They weren't antagonistic about it, but they genuinely didn't understand how [minor] manual labour qualified as roleplay. In fact, roleplay is much more than just sitting around a table talking to NPCs and rolling dice.
At its most basic, roleplay is the process of thinking for yourself as if you were someone else. When you are roleplaying, you are making decisions based on someone else's experiences, values, and priorities. Sometimes those choices align with your own values and priorities, and sometimes they are counter to them.
Roleplay isn't as constraining as it may seem. There's room to game the system. You might acknowledge that, were you someone else, you would choose path A. However, due to recent circumstances or new revelations or common sense, it's obvious that Path A is not a wise choice, so in this instance you choose Path B. Thinking for yourself as someone else isn't stagnate. Your alter ego can evolve in real time, as you roleplay.
Thinking for yourself as someone else doesn't necessarily imply that you get to do all the thinking. Computer games with dialogue trees, and game books with pre-written paths, obviously restrict your possible choices. You're still thinking for yourself, even if only within the confines of select choices.
By contrast, the someone else in a roleplay session also doesn't have to be a defined individual. We often think of roleplay as adopting a specific person's experiences, values, and priorities because when it provides a personality to base choices on.
You can also roleplay without knowing exactly whose frame of mind you're adopting. There's a lot of room within the roleplaying hobby to assume the role of an unseen character. I interact with the works of Lovecraft and Tolkien as if I were a scholar within those fictional worlds. I don't "study" their works as a real-world scholar (I wouldn't know how to even begin that) but I mine their works for hints about the fictional world the stories are set in. I'm imagining, at least while I'm reading, that I'm someone within the fictional setting, studying reports or histories of recent events. Both of those authors practically invite you do so. Many Lovecraft stories are written from the first-person perspective and claim to be confessions or investigations or reports of actual events, and for Tolkien there's an intentional conceit that the books are either written by Bilbo Baggins himself or were curated and preserved by someone like him.
I extend the concept of roleplay as an unseen character as far away from a story as necessary. Call it theorycrafting or list building or character creation or world building, but for me the act of "preparing" for a game is part of the roleplay experience, at least if you want it to be.
When I build a character for a tabletop roleplaying game, I build the character "in" the game world. I'm not just assigning numbers to stats, I'm researching backgrounds and origins, I'm imagining a backstory, I get flashes of previous experiences. I'm not sitting around the table with a gaming group, and I may never even "play" the character in a game, but the connection to the character is real.
Similarly, I've spent literal days in a blurry haze of feverish modeling and painting as I expand the world of a tabletop game. During those hobby sessions, I'm not just building models, I'm writing the history of my version of the game world. What if there were suddenly lizard people in this game? What if this city was actually built above ancient technology, and a tunnel leading down into a hidden world exists within these ruins? What if these stones were a summoning circle? Mine are rarely original ideas, but then again they're not in any adventure or campaign book I can buy, so they're original enough for my purposes. It's all part of the storytelling process, and it forms the gaming experience I have when I finally do get around to rolling dice, if ever I do. Not all roleplaying experiences necessarily end in rolling dice for a game.
The game Ex Novo arguably stretches the limit of my definition of roleplaying. It's almost not a game, but a map-making exercise. You create a fantasy map, much as you would build a character. You roll on random tables to find out what events occur in your world even as you build it. You can play it analytically, using it as a way to develop a setting, or you can play it narratively, just for the map-based storytelling. Are you roleplaying as a cartographer or as a god or as a historian? Or are you just using the system to generate a map that incorporates unexpected world events? I think it can be roleplaying either way.
It might be that when I say "roleplaying" I really just mean "gaming". Maybe we don't need a broad definition of roleplaying, or contrariwise maybe we don't need a term at all. If you're having fun doing an activity, you don't have to refer to it as anything other than "having fun." Personally, I often consider myself a player of roleplaying games more than I consider myself a gamer, but maybe that's just a force of habit.
Whatever the terminology means, ultimately it's about intent. Maybe to other people, you're just hunched over a desk painting tiny figurines, or you're just reading a book, or you're just sitting outside daydreaming. But if you think you're roleplaying, then I believe you probably are.