Taking Leshies as an example, they can be summoned with the Summon Plant or Fungus spell. They also have the Verdant Burst ability (abbreviated):
When a leaf leshy dies, a burst of primal energy explodes from its body
The entry is slightly different for each form of Leshy, but they all give an instantaneous healing effect to nearby plant creatures, and most cause the area to become difficult terrain for 24 hours or permanently.
However, they also gain the Summoned trait, which states:
They are automatically banished if reduced to 0 Hit Points or if the spell that called them ends.
Which of these triggers first? What if the leshy is killed by massive damage? Is there a distinction between the instantaneous healing and the lingering difficult terrain (if the healing occurs, is the terrain then banished with the Leshy)?