I think one of the loading screen tips says there's also a hearing component to stealth, not just visual. Attempting to use Hide next to an NPC usually does not work for me. I'd need to do it a bit further away (~2 melee attacks range) then instantly enter Turn Based mode, F5, then go pickpocket the NPC.
Hide and pickpocket both use an Action resource. If you enter turn-based mode too quickly after hide you won't get the action back. If you're specced into Thief you can Dash twice as bonus action to get the heck outta there before anyone reacts.