Hebrews 11:27 ESV
By faith he left Egypt, not being afraid of the anger of the king, for he endured as seeing him who is invisible.
But in the original narrative the author clearly states that Moses was afraid and left Egypt
Exodus 2:14 ESV
He answered, “Who made you a prince and a judge over us? Do you mean to kill me as you killed the Egyptian?” Then Moses was afraid, and thought, “Surely the thing is known.” 15 When Pharaoh heard of it, he sought to kill Moses. But Moses fled from Pharaoh and stayed in the land of Midian. And he sat down by a well.
How then does then author of Hebrews say Moses was not afraid?