Trees only hold carbon until they fall and rot. It's not a permanent solution.
Time-to-rot varies, from 50-100 years for a spruce, 200-300 for a pine.
I've witnessed downed redwoods myself, over the course of four, nearly five decades, which have failed to decompose even in highly damp conditions.
Bogs and swamps are also underappreciated CO₂ sinks.