Most global deforestation involves slash and burn. This releases the carbon stored in the trees. But I think that's OPs point. A growing tree doesn't remove carbon, it temporarily stores it until it dies or burns.
Trees do pull carbon out of the atmosphere, which can be stored in the form of "wood", and it doesn't re-enter the atmosphere until burnt.