If you put a character in stealth mode and move to the shelf or npc you want to steal from, regardless if spotted, you'll easily pickpocket without much effort. How? Just pick another character and start a dialogue with any character in the map. Upon starting a dialogue, the cone of view / range of alertness is reset for any character, not only for the interlocutor, so you can just wait the alertness to drop, end conversation, pause the game, steal. Make sense if this work only on the interlocutor: you distract him/her so the lose of alertness can be a thing, but distracting someone from the other side of the map and steal between 3+ cone of view without points in stealth (you just need to be fast to pause the game at the end of dialogues) is a bit too much
Edit.
Sorry, already reported in this topic:
https://forums.obsidian.net/topic/100374-bug-npcs-stop-observing-you-during-dialog/