SE seems to have stealth changed F8's functionality back to targeting the nearest monster rather than the nearest NPC which was how it used to work years ago. I don't see them making a comment about it so I wonder if it was unintentional...
Does anyone know of a way to change it back?
It has always preferred monsters to npcs. It goes:
Nearest monster in cone of vision
if no monsters, nearest npc in cone of vision
It wasn't changed, it's been that way forever. An addon could be written to select a npc and insert the target command, but there's not a simple ingame way to fix it.