Child hides when hurt

Em

My almost 4yo daughter has started to hide when she gets hurt. It’s usually only when she’s around people outside our immediate family - uncles, aunts, friends, strangers. She runs to me and hides her face, and holds back her tears.

My husband and I have ALWAYS taught that it’s ok to cry, and we don’t get upset when she gets hurt of course, so where is this coming from? It makes me so sad. I don’t want her to feel shame or embarrassment when she gets hurt.