I usually just put the money in front of the cashier.
Anyway just commit to handing the money or putting it on the counter.
It's like walking in a hallway in school.
If you commit to going left or right clearly, then people will be able to anticipate where you'll go, and you won't bump into anybody.
Same concept, except instead of going left or right it's putting the money on the counter or handing it to them.
I tried that the other day, we were both committed to doing a different method, and when the awkwardness was reaching maximum, we both broke down at the same time, which caused untold levels of spaghetti to flow out of our pockets. I am serious, no matter what I do, it ends awkwardly q_q