Not everyone has the holy spirit, but only those whom God is calling out to be a people for His name (Acts 15:14). So, let us address the question: “If someone is begotten of God's holy spirit, then what happens to the holy spirit when that person dies?”
When a person is begotten by the holy spirit, the Bible says he is a new creature. “Therefore, if any man be in Christ, he is a new creature: old things are passed away; behold, all things become new.” (2 Corinthians 5:17) God views his flesh as dead. Romans 6:4, “Therefore we have been buried (as occurs at baptism) with Him through baptism into death, so that as Christ was raised from the dead through the glory of the Father, so we too might walk in newness of life.” The aim is to become a Christ-like new being. The indwelling of the holy spirit creates that new creature – it cannot be separated.
So, what is the holy spirit developing in Christians? The Bible describes the holy spirit as the spirit of holiness (Romans 1:4), truth (John 14:17), meekness (Galatians 6:1), wisdom (Ephesians 1:17), glory (1 Peter 4:14), to name a few. These descriptions are speaking of the power or influence of God to develop a holy new being out of a sinful, fallen person. That is a huge undertaking, which could only be accomplished through God’s great power.
When a person who is begotten of the Holy Spirit dies, he is resurrected (1 Corinthians 15:51,52) and given a new body appropriate to his character and development. “But someone will say, “How are the dead raised? And with what kind of body do they come?” You fool! That which you sow does not come to life unless it dies; and that which you sow, you do not sow the body which is to be, but a bare grain, perhaps of wheat or of something else. But God gives it a body just as He wished, and to each of the seeds a body of its own.” (1 Corinthians 15:35-38) This resurrected being will still have God's spirit of holiness, truth, meekness, wisdom, glory … and all the fruits of the spirit: love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, self-control. “We know that we shall be like him for we shall see him as he is.” (1 John 3:2).