[Moses] supposed that his brothers would understand that God was giving them salvation by his hand, but they did not understand.
Acts 7:25

Stephen said Moses was aware of his messianic role before his personal exile from Egypt. Like Yeshua, his brothers rejected him the first time, so he had to leave for awhile and come back when they were ready. God will have his way eventually. When we refuse him, he might seem to leave us, but really he only goes to prepare for our further refinement. Refusal is never refusal, but only a ticket back into the crucible.

This man led them out, performing wonders and signs in Egypt and at the Red Sea and in the wilderness for forty years.
Acts 7:36