I think it turned out that coal and oil are mostly heavily processed microorganisms. Trees never end up so deep.
You can still get coal made from trees, when a forest fire turns some wood into charcoal and that gets buried in the soil, or under unusual circumstances where a tree gets buried somewhere inhospitable to the microbes that can decompose lignin.
All of these things happen at massive scales, so even though the vast majority of wood does decompose before it can be preserved, even a few percent is probably enough coal to power some future post nuclear apocalypse society's industrial revolution in a few dozen million years time.