Without a defining law (that says any deliberate contact is a RC or similar, which I don't think there is - and I just checked law12 2018-19) then CONTEXT.
Ref here is strong, sees it coming, player is not aggressive, it's a bit sad, it's a friendly, I haven't seen what has gone on before or after, how much ceremony there was, what the significance of this game is for the teams, players, this specific player or the ref. While none of those things matter if you have a clear line/law/offence/sanction, they do matter if you have a judgement call to make.
If, and it's a big if, the ref has given a YC because he didn't feel threatened and that was 90% of his decision made (all other context taking up 10%) then I can understand it.
Big caveat, for me, in any of the leagues I officiate in, it's a red, friendly or not, any context if I am ref. If I am AR I am demanding the ref give the RC and it's the one thing I would have a major tanty about on the spot if a ref was reluctant. My opinion is, down the pyramid, we have to have zero tolerance for this. Ideally it would be the same at the top.
(This hasn't happened to me yet BTW)