And I definitely don’t think NPCs should turn hostile if they notice the spell, unless they’re on the edge of doing so anyway. Rather, an attitude reduction and refusing to speak further with the party would make more sense in most contexts.
In my experience, not every NPC turns to violence. It usually starts a dialogue the same way you would have after robbing someone and being caught.