Our dog used to always lick the dirty dishes as you loaded the dishwasher. We tried everything. We yelled at him, we sprayed him with water, we sprayed him with vinegar water, we tapped his nose, we pulled him back with a leash. Nothing was going to deter him from licking good food scraps.
Then we tried the body block. Every time he tried to get to the dirty dishes, we just put our body between him and the dishwasher. He was cured within a week. Dogs use their bodies to control direction and access. It was a language he understood.