They were guilty as sin. So, they died, in accordance with the Law.
How could they sin when they didn't know what evil was and until they knew what it was?
Who decided and administered the law? Was it what you claim to be the "loving" god?
Sin and death entered the world because a decision was made NOT to believe God.
You claim sin entered the world through them eating the fruit ... yet there was one of gods perfect creatures totally able to use super-powers to deceive them apparently telling porkie pies and deceiving them. Seems like sin was already there and they were just collateral damage.
There's no way to spin it where gods hands don't come our dripping with blood, utterly incompetent, or a bit of both.