There was one black female mentee who I noticed was timid in taking credit for her work. I had recently attended a diversity panel where someone in a similar role as me said that in a similar situation, and her advice to her mentee was "Think about what a white man would do" and everyone applaud such an insightful advice. So identifying such an opportunity, I said the exact same thing word for word, basically "I see you're hesitating to take credit for your work. Think about what a white man would do."
Immediately after saying that, I could tell it wasn't taken well, and she asked "what does that mean?" I couldn't come up with an answer for that which wouldn't be taken in a really bad way, so I backpedaled. She later reported me to an administrative person who luckily felt it was too vague to file a serious report about, but told me to watch what I say.
But I do have a solution (my trick). From that point on, I definitely give more subtle advice unless they have passed my test, which is I see how they react to situations where they could give the benefit of the doubt to others in vague situations. Sometimes, I'll bring up a past story about another anonymous person and see if they are outraged and want to get them in trouble. Only the ones who remark that they probably had good intentions, and don't react too strongly, I'll give more candid advice to.
Regarding why you can't just say the same thing word for word, that's because shared context matters.
This is basic social skills. If you don't have the same shared background and context, then it's unclear if you mean one thing or the other.
So when one woman says "Think about what a white man would do", to another woman, there's the implication that they're talking about their shared experiences regarding society's expectations around women.
When a man says that to a woman, especially it's a white man saying that to a black woman, your contexts and backgrounds are so wildly different that surface area of what you could mean is quite large.
So when you had the chance to clarify yourself and you backpedaled, that made it look even worse because it implied that you had bad intentions and were trying to take your words back.
So yes, it's true. You can't say the same thing word for word as one person say to another if you and the other person do not share the same contexts.