Why was Isaac not supposed to go to Egypt during the famine?
God forbade Isaac from going to Egypt and told him to dwell in the land God would show him, because the Abrahamic Covenant promised Canaan to Isaac and his seed. God pledged to be with Isaac, bless him, and perform the oath sworn to Abraham, so Isaac was to remain in the land of promise.
Les teaches that after God made the covenant agreement with Abraham, He now referred it on to Isaac, the true son of promise. A famine arose beside the first famine in Abraham's days, and Isaac went to Abimelech, king of the Philistines, in Gerar, on the border between Canaan and Egypt. The Lord appeared to Isaac and said, "Go not down into Egypt. Dwell in the land which I shall tell thee of." This is why Canaan, or Palestine, is called the land of promise, because everything connected with Canaan was based on the promises of God. God promised to sojourn in the land, be with Isaac, bless him, give all those countries to him and his seed, and perform the oath sworn to Abraham. That was the Abrahamic Covenant, which God repeated: multiplying Isaac's seed as the stars of heaven, giving them all these countries, and blessing all nations of the earth through his seed because Abraham obeyed God's voice. So Isaac was not to go to Egypt because the covenant blessings and promises were tied to Canaan, the land of promise, and God would be with and bless him there.
And the LORD appeared unto him, and said, Go not down into Egypt; dwell in the land which I shall tell thee of: