I've found that if I try to give a command to the dog that it might understand, my anxiety creeps into my voice and they ignore me.

I have much better luck ordering dogs away by telling them "Get a job!" or something else nonsensical or dismissive. As others have said, it's the tone of voice that counts.