Our Gemara on Amud Aleph discusses Moshe bringing Yosef’s bones out of Egypt. There is a Midrash that gives us Moshe’s behind-the-scenes reaction to this. (The Midrash is obscure but quoted by the Baale Tosafos in Hadar Zekeinim Shemos 13:19):
Moshe complains to God, “Why is it that Yoseph merited, at least, to be buried in the land of Israel, and not I?” God answered, “Yoseph called himself a Jew, and you did not.” Meaning, Yosef referred to himself as someone hailing from the land of the Ivrim ( Bereishis 40:15), while Moshe was referred to as an “Egyptian man” (Shemos 2:19).
We might wonder, how is this a fair criticism of Moshe? He didn’t even describe himself that way, it was only Yisro’s daughters who described him that way! Two possible answers occur to me: Either the criticism is for Moshe having seen himself partially like an Egyptian by evidence of him appearing that way, at least to the extent that Yisro’s daughters confused him with an Egyptian. Or, it’s a criticism that Moshe didn’t object enough to this description. So Moshe wasn’t really guilty, but rather as our tradition teaches, God is more exacting on the righteous (Yevamos 121b).
In either case, we take a moral lesson from what happened to Moshe. We should be proud to look and act like Jews. In this day and age with increased antisemitism, it is sometimes hard to know when it is prudent to not advertise one’s Jewishness, and when it is showing lack of confidence and faith. I don’t presume to have the answer with an exact formula, but one thing is for sure. One might decide to hide his Jewishness fearing physical harm. However, it never should come from being ashamed that one is a Jew.