You are aware that "temporarily" in this context is the lifespan of a tree, right? Trees live anywhere from several decades to 20+ centuries, and their remains, once broken down, provide nutrients to the soil so more trees can grow.
Also the tree is not capturing carbon, instead emitting, half of the year if not planted in the optimal places near the equator.
And it's carbon neural or negative once almost fully grown.
You are mostly right, but some of that carbon does sink into the soil and get captured for much longer periods, and some of that will will sink further and likely never see the surface of the earth again unless someone digs it up.