Who will replace plants in 600 million years?

As you probably know, the atmosphere will begin to become deficient in carbon dioxide within 500 million years, and then all plants and animals dependent in some way on plants will become extinct, making room for a new era where birds, mammals, reptiles and perhaps even amphibians no longer exist, but what primary organism will replace plants? chemotrophs cannot either, as they also depend on carbon dioxide and other elements that may be more scarce on land. and it will have to be an organism capable of creating large structures like trees to open niches like arboreal and gliders for example