There's a Bailey where there's a large moat with a lot of polearm wielding orcs that you have to navigate around. In my current game (EthnicCake on CJR, FeFE) I was resting near there only to have my rest stopped by an orc attacking me, one that was not on screen when I started resting. I assume this is because the orc, normally a melee enemy, was behind the water and so the game though I was safe from him.
I know some enemies have ranged weapons/wands/etc. that are hidden until they use them, but in the case of the polearm, it was obvious that it could reach me, and so I would expect resting to stop when it entered my LOS. Alternately I could see it make sense for resting to stop when an enemy enters your LOS that was not there before, regardless of whether or not it can reach you.