One aspect often forgotten when talking about the role of forests and trees in the CO2 balance is that trees are only a CO2 sink as long as they grow and as long as the carbon taken from the air is stored in fixed form. As soon as trees are burned and carbon from the soil is released as gas, all the captured CO2 will be brought back to the atmosphere.
Adding other greenhouse gases such as methane to the overall impact budget, forests such as the Amazon can be source of warming to the global system, as scientists just published in this comprehensive study.
This emphasis once again is on the importance of understanding the climate System and its components in a holistic and comprehensive way. Single processes may influence and control each other, generating in the end a final impact not expected nor desired. This can also be true for even smaller system such as urban streets. For example, tree cover in narrow streets can worsen the pollutant concentration at pedestrian level due to lower wind circulation, which is contrary to the effect often expected by trees.
Further information about the study can be found here: https://www.nationalgeographic.com/environment/article/amazon-rainforest-now-appears-to-be-contributing-to-climate-change