Adding this code (between the /* START */ and /* END */ will make plants that are Ripe stay at 100% health despite conditions:

if (HasPermission(entity.OwnerID) && state == PlantProperties.State.Dying && entity.harvests < entity.Properties.maxHarvests)
{
     /* START */
    entity.Heal(100);
     /* END */
     return true;
}