When God later commanded Abraham to sacrifice his only son, Abraham trusted in God’s promise that he would have many descendants. In order to believe this, Abraham would have to trust that God could somehow restore his son to life.
Or Abraham could simply have another son.
It was never God’s intention that Isaac should die, and Abraham must have believed this.
You say that now. It doesn't say that in the bible.
A proper moral ending to the story of Abraham and Isaac would have been Abraham saying something like "No. I will not kill my son. You have taught me that killing is wrong" and God saying he passed the test. Or at least Abraham saying he knows this demand to kill his son is a ruse and that he knows God won't actually have him harm his son. But a dishonest God playing such a ruse would also go against the claim of God being good.
I also note that this is not the only case in the Bible of obedience trumping morality. It is the most common theme in the book. The first commandment isn't "Be good to your fellow man". It is "Thou shalt have no God before me". The rest of the ten commandents are as much about obedience as morality.
Adam and Eve are told not to eat of the fruit of knowledge of good and evil. Since they hadn't eaten the fruit yet they could not have had any moral sense of whether or not eating the food and obeying God is good. Obedience is supreme here. In fact God appears to be demanding that they not learn right from wrong. Only the snake seems to be doing the right thing and telling them they should eat the fruit of knowledge of good and evil, and thus gain the potential to be moral creatures.
The theme runs on and on through the bible. The tower of Babel is another story about obedience and power. The story of Job shows God showing off at how he can get Job to obey him even as he abuses him. Job will not stand up to God's abuse. The story of Christ is about vicarious redemption, that good and bad actions are secondary to belief and following Jesus as your Lord and Saviour, and that there is no personal responsibility for your actions so long as you turn to God in the end. Except of course if you engage in blasphemy and speak against God - that is unforgivable.
Satan is not noted in the bible as doing much wrong besides turning against God. We don't get stories about how Satan flooded the world or did genocide etc. We only get stories about how he opposes God, and because of this mere opposition we are to declare him the greatest evil.
And it goes on and on. Obedience over morality every time along the way.