No expert here but I believe it depends on how it decomposes. If wood rots at the surface, my understanding is more carbon is released into the atmosphere but if it is buried or decomposed using fungi or soil microbes, more carbon is captured into the soil.
Forests have a lot of decaying and decomposing deadfall wood but still seem to be a carbon sink so it may be a layering thing...
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.