I always feel that shoppers overthink being spotted way too much. If you see the name tag hidden right away small talk works good "How are you today......" with a glance at the name tag "oh i cant see your name"
It's pretty natural here in the south anyway. This work regardless of it being a cashier/customer service agent/stocker. Seriously, a lot of people like to know who they are talking to, so they just ask. It's not really too unusual. So unless the shops guidelines prohibit it (and I have done my share that do), don't overthink just asking.
But my main points is don't think anything you do gives you away a a shopper. People in retail of any sort see all kinds of people every day, and go through hundreds of customers a day. Unless you are wearing a clown suit with a big sign that says "I secret Shop" nine times out of ten, once you leave the store, the employee will forget about you, and not even give a thought to you be a secret shopper.