About 400 years passed from this pharaoh
“And Pharaoh spake unto Joseph, saying, Thy father and thy brethren are come unto thee: the land of Egypt is before thee; in the best of the land make thy father and brethren to dwell; in the land of Goshen let them dwell: and if thou knowest any men of activity among them, then make them rulers over my cattle. And Joseph brought in Jacob his father, and set him before Pharaoh: and Jacob blessed Pharaoh. And Pharaoh said unto Jacob, How old art thou? And Jacob said unto Pharaoh, The days of the years of my pilgrimage are an hundred and thirty years: few and evil have the days of the years of my life been, and have not attained unto the days of the years of the life of my fathers in the days of their pilgrimage. And Jacob blessed Pharaoh, and went out from before Pharaoh.”
Genesis 47:5-10 KJV
and this pharaoh of Moses time 4 generations later when things again took a bad turn but would lead to thier deliverance just as god promised Abram in genesis 15
“And Joseph died, and all his brethren, and all that generation. And the children of Israel were fruitful, and increased abundantly, and multiplied, and waxed exceeding mighty;
and the land was filled with them. Now there arose up a new king over Egypt, which knew not Joseph. And he said unto his people, Behold, the people of the children of Israel are more and mightier than we: come on, let us deal wisely with them; lest they multiply, and it come to pass, that, when there falleth out any war, they join also unto our enemies, and fight against us, and so get them up out of the land. Therefore they did set over them taskmasters to afflict them with their burdens. And they built for Pharaoh treasure cities, Pithom and Raamses.”
Exodus 1:6-11
I think you may be thinking the same pharaoh of Joseph’s day is the same over in Moses day but there’s four generations between and everything became wicked after the reign of Joseph and the pharoah who loves Joseph and gave them his family the best land in Egypt and honored them
“And Pharaoh spake unto Joseph, saying, Thy father and thy brethren are come unto thee: the land of Egypt is before thee; in the best of the land make thy father and brethren to dwell; in the land of Goshen let them dwell: and if thou knowest any men of activity among them, then make them rulers over my cattle. And Joseph brought in Jacob his father, and set him before Pharaoh: and Jacob blessed Pharaoh. And Pharaoh said unto Jacob, How old art thou? And Jacob said unto Pharaoh, The days of the years of my pilgrimage are an hundred and thirty years: few and evil have the days of the years of my life been, and have not attained unto the days of the years of the life of my fathers in the days of their pilgrimage. And Jacob blessed Pharaoh, and went out from before Pharaoh.”
Genesis 47:5-10 KJV
and this pharaoh of Moses time 4 generations later when things again took a bad turn but would lead to thier deliverance just as god promised Abram in genesis 15
“And Joseph died, and all his brethren, and all that generation. And the children of Israel were fruitful, and increased abundantly, and multiplied, and waxed exceeding mighty;
and the land was filled with them. Now there arose up a new king over Egypt, which knew not Joseph. And he said unto his people, Behold, the people of the children of Israel are more and mightier than we: come on, let us deal wisely with them; lest they multiply, and it come to pass, that, when there falleth out any war, they join also unto our enemies, and fight against us, and so get them up out of the land. Therefore they did set over them taskmasters to afflict them with their burdens. And they built for Pharaoh treasure cities, Pithom and Raamses.”
Exodus 1:6-11
I think you may be thinking the same pharaoh of Joseph’s day is the same over in Moses day but there’s four generations between and everything became wicked after the reign of Joseph and the pharoah who loves Joseph and gave them his family the best land in Egypt and honored them