Trees can make great rappel anchors, but there are definitely some best practices and things you want to avoid. Have a look at Part 2 of my detailed series on tree anchors.
Premium Article available
https://www.alpinesavvy.com/blog/trees-for-climbing-anchors-rappel