Form filter by field on entity_autocomplete
The core autocomplete feature expects the label of the returned matches contain the id of the referenced entity like Superuser (8) which is parsed by the drupal.autocomplete behavior and submitted through the actual form input. The easy solution its to ensure that your response returns the expected values. But you can always implement your own. See Drupal\entity_reference\EntityReferenceController to see how the core implenents it.