Even before Moses' return to Egypt, announced that Pharaoh would resist the order to free Israel.
In Exodus 4.21 God tells Moses that he will harden Pharaoh's heart and that he will not let the people go.
This announcement comes before the official confrontation with the sovereign.
It shows that Pharaoh's resistance does not surprise God.
In Exodus 7.3-5, the renews this declaration.
He announces that he will harden Pharaoh's heart, multiply his signs and wonders, and bring out the Israelites of Egypt with great judgments.
The objective is also specified: Egyptians will know that it is the one.
Pharaoh's hardening is therefore from the beginning part of a broader perspective.
God announces not only the resistance of the sovereign, but also the judgments that will accompany deliverance.
This statement does not mean that Pharaoh would be presented as a man without will.
On the contrary, the story shows that he makes decisions, makes promises and voluntarily returns to his commitments.
The tension between these two dimensions is one of the essential aspects of the text.