I'm not sure I fully understand the nature of your dilemma. While I can tell that you'd much rather favor roleplay over optimization, what about D&D is forcing you to prioritize optimization over roleplay? If you feel that you're cornered into doing that, that's the first thing I'd look for. Is it the players you play with, who optimize and make your character feel obsolete if you aren't similarly built? Is it the DM, who leans too heavily into the numbers gaming for your tastes and not into the roleplay?

5e, at it's core, is an extremely versatile system. You can play it any way you'd like, favoring Roleplay, or Optimization, or Interaction, or Storytelling, or whatever you'd like. The system does not pressure one way or another, the pressure you're feeling likely comes from an adjacent source.