Ge 50:22 So Joseph dwelt in Egypt, he and his father's household. And Joseph lived one hundred and ten years.
23 Joseph saw Ephraim's children to the third generation. The children of Machir, the son of Manasseh, were also brought up on Joseph's knees.
24 And Joseph said to his brethren, "I am dying; but God will surely visit you, and bring you out of this land to the land of which He swore to Abraham, to Isaac, and to Jacob."
25 Then Joseph took an oath from the children of Israel, saying, "God will surely visit you, and you shall carry up my bones from here."
26 So Joseph died, being one hundred and ten years old; and they embalmed him, and he was put in a coffin in Egypt.
.
Joseph grew old in Egypt. There he saw his great-great-grandchildren. And yet Joseph did not feel at home in Egypt. Home was in the Land of Promise. And so, he instructed brethren and the children of Israel to bring him back to Canaan sometime in the future when God would finally visit them to bring them home.
Again, this should encourage Moses' original Israelite readers that home is back in Canaan. They should not stay or return to Egypt.