Not sure if this is intended but my berry bushes grow placed on stone within a cave.
Welcome to the forums, @OPKAN_K
I believe they behave like flowers and other wild plants. Not sure about trees.
If you feel like they shouldn’t grow berries if they’re inside of a cave, you can change the category of this thread to #suggestions .