Prior to his obedience, Abraham had already submitted to God in His heart. We see this clearly written in Hebrews 11 thus:
“By faith Abraham, when God tested him, offered Isaac as a sacrifice. He who had received the promises was about to sacrifice his one and only son, even though God had said to him, "It is through Isaac that your offspring will be reckoned." Abraham reasoned that God could raise the dead, and figuratively speaking, he did receive Isaac back from death”. (Vs 11:17-19, NIV)
This means Abraham had submitted to God’s will in his heart by accepting Isaac’s death. So that when God eventually told him not to kill Isaac, it was like having his son come back from the dead.