What do you do when she scratches? Do you let her get away with it? Wait til she's done scratching? Repeat the command?
When he was younger, Camper used to try this. (sigh..Camper...the master manipulator...) He also has massive allergies and what started out as legitimate scratching, he soon learned he could use to delay doing what he didn't want to do.
What we found was that for most commands we just had to say Sit. (he starts to scratch) NO (firm 'no.' Not yelling. But very firm, like "I know what you're up to." If he was on a leash, I would give a light leash correction as well. ). Then if he didn't sit immediately, I repeated Sit again. He always sat. "Good sit." So basically, I was retraining him how to sit the first time every time.
Sometimes, on "Come" he'd try the scratching or as Chris points out, the yawning thing (like all of a sudden, he's so exhausted? Please!) We started to use a long line in the yard at all times.
Then we did the same thing as we did for the sit. "Come" (yawn or scratch). "No" (jerk the line a little as a correction). Repeat 'Come' only if necessary (most of the time, he didn't forget what we wanted him to do, as as soon as we said,"no," he came on his own). As he started trotting toward us. "Good come!"
While we didn't start using treats on simple command like sit, down, come again, we did start to ramp up the amount of praise we gave him. I've learned that when dogs start getting non-compliant on commands they should know really well, a lot of time it's because we don't really acknowledge that they've done anything special. (When I ran this theory by my trainer, she absolutely agreed.)
It took us about 2 months to get this avoidant (scratching, yawning) behavior extinguished. Every once in a while, he tries scratching. Or maybe he's really itchy? Our rule now it that it doesn't matter. You get a command, you do it. You can scratch once you're sitting, lying down, once you get here, etc. Not before.