While GNS Theory is arguably outdated and messy, I think its "stances" idea may help elucidate things. Edwards describes a few different stances; I'll try and connect a couple of them to this discussion.
Actor Stance is when a player is making decisions as their character. They are acting only on the character's knowledge and motivations. I think this is what a lot of people (from a DnD5e or similarly trad background) are referring to when they say "roleplay" while meaning "outside combat".
Author Stance is when a player is making decisions as the player, then (optionally) justifying those decisions retroactively to fit their character. They are making the most optimal decisions they can within the game system to meet the combat's win condition, and "acting" is secondary.
So when you have a game like DnD5e, where there is a complicated system full of optimal system decisions to make, it behooves a player to drop out of Actor Stance and into Author Stance. Or at the very least, heavily prioritize the latter over the former. When combat starts, "roleplay" generally stops, because players switch Stances to meet the demands of the strategy board game part of the system.
Meanwhile, the vast majority of stuff outside of combat in 5e has very little optimal decision-making to do -- just pick a Skill and roll a die. This low complexity means the player more easily stays in Actor Stance. I think that if 5e approached social situations with same kind of complex, optimization-encouraging methods that it does with combat, you'd see a lot of people complaining that there's no "roleplay" in these situations, because thinking as the character (Actor Stance) becomes secondary to thinking as the player (Author Stance), strategizing out-of-character to ensure better outcomes.
The thing is, players of 5e are doing this all the time in non-combat situations already -- my Intimidation Skill is really high so I'll try that approach -- it's just that the decision-making there is quick and simple enough not to disrupt a player's Actor Stance.
In games that do non-combat complexity well, you as a player will be dipping briefly out-of-character to think about optimal strategies through the lens of the player, just like you would with 5e Skill checks. The trick to keeping the "roleplay" feeling is to be well-versed enough in the system that you can quickly and confidently switch lenses without disrupting that Actor Stance feeling.
So, system mastery is important to make complex social rules "still feel like roleplay" (but a completely different kind of system mastery from what you might expect, if you're only well-versed in trad games), and a game also needs to be designed so that its social scenarios are not slow, technical slogs on the level of 5e combat.
One recent example of a game lending to this really well is the Temeraire RPG, currently in development but available in quickstart. (In a nutshell, Temeraire is a fantasy series set in the early 1800s; it's the Napoleonic Wars, with air forces, with dragons instead of planes.) The quickstart presents three conflict types: Ball, Draconic Feast, and Aerial Battle. The aerial battle system is very clunky and I hope they rework it, but the ball and feast conflicts are excellent. In a ball, human characters choose dance partners (or to not dance), pick types of action from a short list, and pursue goals like embarrassing rivals, securing information, and extracting promises from others (giving them a Duty or Desire, one of the primary mechanics of the game). In a draconic feast, dragons boast and flex to climb a social hierarchy (or challenge the hierarchy's valuation system entirely) for control over the spoils of the feast. There are mechanical steps throughout balls and feasts, but each of those steps is short and flavorful, and always cascades directly into dialogue and "roleplay". Running these a few times, I found that Actor Stances were only really disrupted when we had rules questions, because we were pretty fresh to the system and learning as we played.