No, it doesn't
Scaring or lying to an enemy doesn't count as affecting them for the purposes of the sanctuary spell since the spell was written as a time-out: keeping you or an ally safe while preventing cheating - you harming an enemy's stats or HP value.
Also, the word "affect" isn't to be taken in the Webster's dictionary sense within a D&D definition. In D&D we cast spells to affect someone / something by placing an altering magical effect on them / it.
You aren't altering the minds or bodies of your enemies with a spell.
You are hoping that your causation has an effect on your surroundings. While hope and faith are fundamental tools for a cleric I wouldn't count them as an unfair use of spells whilst in sanctuary.
In the future, if you or a DM (or if you are a DM) have questions about rules interpretation just keep in mind that the rules are meant to make the game fun to play. These tips may come in handy:
If you're playing with friends
Everyone at the table hopefully is on equal power levels and everyone is having a good time. That said, they're your friends so you can hopefully trust the DM if they are being stiff about you playing so cleverly - maybe they had another outcome in mind that required those villagers to hang around, or that guard to ask questions and you might be making it hard for the DM to move you through the story.
The best time for rules discussion is before or after a session, so as not to ruin the fun for everyone. The DM, being your friend, really wants to make the game fun for you but always respect their limitations.
If you're playing with acquaintances
Sometimes you can't find enough friends to run a D&D jaunt and you need to scratch that role-playing itch. This is a bad pinch. Always follow what the DM says is acceptable during a session. Don't bother arguing, you'll just be "that dude" that doesn't play well with others and you may have trouble picking up games at your local store in the future.
If you're playing in a sanctioned event
Generally there is a "rules lawyer" i.e. the person who runs the games for the store and is authorized to clarify the rules. If you feel unfairly treated, or think that there is an interpretation that is unclear, you'd ask them. The answers are generally logical, concise and consider your actions and weigh them against how the rules are intended to make the game run. This is a really great way to learn how to play without offending anyone and the chance to try out all your zany spell ideas.
Hope you find that perfect game!