Great question. The answers to this question maybe correct, but may get confusing because of one’s concept of “What is God?” and what comprises “death”.
To begin with, there is no “upper case” in the original Hebrew word “elohim” translated from Old Testament to an English word that starts with capital letter “G” as in “God”. Moreover, the word “elohim” beginning in Gen. 1:1 and on, is a generic or common name. It can refer to the only true God the Creator to be worshipped, false gods to be avoided, god as angels (like Lucifer the god of this earth/world), rulers, even ordinary man: see Concordance and definitions of elohim as well as https://fact-s.net/2014/06/29/what-is-god-2/.
Much like the common name Smith, the proper name John Smith identifies which particular Smith is referred to. In Genesis 1:1, the “common name” of the Creator God is “Elohim” and was specifically identified with a “proper name” in Gen. 2:4 as “YHVH ELOHIM” or Lord God in English. This YHVH ELOHIM is numerically one, “above all gods” (Ps. 95:3; 135:5) and the only Lord God commanded to Israel to be worshipped and not any other; this became the basis of Israel’s SHEMA doctrine ( Deut. 6:4).
The immortal Creator God “elohim” or YHVH ELOHIM/Lord God is also named LOGOS in John 1. He incarnated into man-Jesus to die for Adam’s and mankind’s sin to reconcile us to God the Father. This particular Elohim was the God referred to in the O.T. Whereas, the Father was the God referred to, in general, in the N.T. They are indeed different, yet “one”, as we are all different, yet “one” with our Lord God Jesus and our God the Father ( I Cor. 12:12; 12:20).
Without this incarnation into “mortal flesh” like Adam, the spirit-composed and immortal Creator God would not have died. This is an absolute expression of love and faith “of” Jesus (Rom. 3:21-22) for him to “give up his divine/ spirit composition”(Phil. 2:7) and be human to die. Indeed, there is no greater love than for one “to give his life for another”(Jn.15:13). As man-Jesus, a mortal flesh, he is still .”god”, as in John 10:34.
Regarding death, the mechanism can be understood by going back to the “creation of man”. Remember that Adam was formed “from the ground, and it was good” but became “living” or alive only after the “breath of life” was breathed into him (Gen. 2:7; 7:21-22). Presence of this “breath of life” in “mortal flesh” defines life or death. Functionally, we observe this among newborns; unless there is spontaneous or artificial breathing, they are dead.
This is why death happens when the “breath of life”, (the “spirit of man”) leaves the “mortal flesh”, goes back to God the Father and our physical body becomes “dust”. See Eccl 12:7. What happens to that ” breath of life/spirit of man” depends on what the Father decides. Without that ” breath of life” restored into another body, “physical or spirit- composed”, for practical purposes, the person is dead. Consider all “data” in the computer can be downloaded into a “thumb-drive” and you can take the “thumb-drive” anywhere you go. The computer may be buried/ destroyed but the “data/ memory” in the ” thumb-drive” can be “restored” in a “new” computer, thus like being “resurrected”.
With the context laid out in the preceding prolegomenon, Jesus is the Creator God YHVH ELOHIM, Logos and eternal, the “same yesterday, today and forever” (Heb. 13:8). As a Creator God and Logos, he is immortal. But, as incarnated “mortal flesh”, yes God “died” for our sake