Added class "active", if node_id same.
In your .theme file :
function THEME_preprocess_views_view_unformatted__YOUR_NAME_VIEW__block_1(&$variables) {
$node = \Drupal::request()->attributes->get('node');
$node_id = $node->id();
$view = $variables['view'];
$rows = $variables['rows'];
$id_view = $view->storage->id();
if ($id_view == 'YOUR_NAME_VIEW' && $view->current_display == 'block_1') {
$variables['#cache']['contexts'][] = 'url.path';
foreach ($rows as $id => $row) {
$view_node_id = $row['content']['#node']->id();
if ($view_node_id == $node_id) {
$variables['rows'][$id]['attributes']['class'][] = 'active';
}
}
}
}
There is one condition!!!
You need add any class in 'Row class' in your view.
FORMAT - Settings - Row class(The class to provide on each row.)