code: public function preRemove(LifecycleEventArgs $args): void {
  		if(!$this->enableIndexing) {
  			return;
  		}
  		$this->removeEntity($args->getObject(), $args->getObjectManager());
  	}
docs: Removes the entity from the index when it marked for deletion
  
  @param LifecycleEventArgs $args