Yes, that's why planting trees to offset carbon emissions is not really as good an idea as it seems, trees can live a long time but they're not immortal, and when they die they release their carbon back into the environment.
If you turn what now is barren land or grasslands into a forest, it absorbs CO2 as it grows, and that CO2 stays captured for as long as that land is a forest, it doesn't matter if individual trees die and decompose.