function THEME_preprocess_node(&$variables)
{
if ($variables['view_mode'] == 'teaser' && !$variables['node']->get('field_properties')->isEmpty()) {
/** @var \Drupal\node\Entity\Node $node */
$node = $variables['node'];
$properties = $node->get('field_properties')->filter(function ($value) {
return $value->entity->get('field_in_teaser')->getString();
});
$variables['content']['field_properties'] = $properties->view('teaser');
}
}