It strikes me that trees make it obvious which parts of them are potentially edible, even when they don’t want those parts to be eaten, especially their leaves.* They’ve had plenty of time to evolve leaves that don’t stand out from the bark; I think a mutation that caused leaves to look more like bark (e.g. that encouraged green bark or added a red pigment and/or rougher texture to leaves) could easily occur and could be a net benefit. So why do leaves still stand out, and get eaten?
*In fact, if leaves stood out less, then the parts they do want eaten – their fruit – might be easier for fruit-eating creatures to locate.