I used points of trees and created buffers around them based on their canopy widths. I rasterized these polygons and burned tree height as a value (later to be used for shadow modeling). Important is to add that many trees overlap since their crowns are touching.
After using the 'Rasterize' (gdal) tool I got a raster where most of the lower trees got priority over higher ones and it seems that they 'cover' higher trees.
To fix it, I tried this approach, and it fixed some of the conflicts (lower tree over higher), but not all of them. I also tried dissolving trees based on the same height and then rasterizing, but it didn't work.
Is there any other approach to give priority to polygons with higher Tree-height value and obtain spatially more accurate raster?