Exclude specific nodes from a view based on role permissions
Views does not respect hook_node_access which is what this module uses. Module creator should've used hook_node_access_records along with hook_node_grants instead.
You could try comment #3 as a workaround.

/**
 * Implements hook_views_pre_render().
 */
function example_views_pre_render(ViewExecutable $view) {
  $user = \Drupal::currentUser();
  $vapn_config = \Drupal::service('config.factory')-&gt;get('vapn.vapnconfig');
  $vapn_node_types = $vapn_config-&gt;get('vapn_node_list');

  foreach ($view-&gt;result as $key =&gt; $row) {
    if ($row-&gt;_entity) {
      $is_vapn_bundle = FALSE;
      if ($bundle = $row-&gt;_entity-&gt;bundle()) {
        $is_vapn_bundle = in_array($bundle, $vapn_node_types);
      }

      if (!$row-&gt;_entity-&gt;access('view', $user) &amp;&amp; !$view-&gt;query-&gt;options['disable_sql_rewrite'] &amp;&amp; $is_vapn_bundle) {
        unset($view-&gt;result[$key]);
      }
    }
  }
}

credit: ash2303