Services/DoctrineListener.php
public function preRemove(LifecycleEventArgs $args): void {
		if(!$this->enableIndexing) {
			return;
		}
		$this->removeEntity($args->getObject(), $args->getObjectManager());
	}
public function preRemove(LifecycleEventArgs $args): void {
		if(!$this->enableIndexing) {
			return;
		}
		$this->removeEntity($args->getObject(), $args->getObjectManager());
	}
Removes the entity from the index when it marked for deletion

@param LifecycleEventArgs $args