If that was the plan all along as I have proposed, then yes. The consequences must follow the action.Genesis is choked with errors, contradictions and outright fabrications. Only one with the faith of a mustard seed and a brain to match would deny it.
The omniscient and omnipresent God did not know Adam and Eve had eaten the fruit of knowledge until they 1) came out of hiding and 2) were wearing fig leaves - then he got angry. The story goes that he cursed Eve with the pain of childbearing, removed immortality and cast humans out of the Garden. Is that how you would (mis)treat your children for eating the ice cream you purposefully left in front of them?
Again, death means we have the ability to return to live with Him.