One thing I do and I forgot to mention is that I cheat by mounting up when that's an option. It makes it much easier to quickly get behind an object to block line of sight when the NPC pauses.

Also, you don't have to be right up against the object. You just need it between you and the NPC so their line of sight is blocked.