Technically trees don’t actually “heal.” What you’re seeing after a wound has been covered up, is the sealing or walling off of wounded tissue. A tree in addition to other plants are incapable of actually healing themselves the way humans do in the traditional sense.
This is actually known as CODIT or “Compartmentalization of Decay in Trees.” Trees will attempt to seal off the area of decay in a fashion to fend off against the elements or pests.