Restrict node to be shown only in a view and not by its url?
The purpose of the Rabbit Hole module is exactly that, even if it doesn't apply just in the view case.


  Rabbit Hole is a module that adds the ability to control what should happen when an entity is being viewed at its own page.
  
  Perhaps you have a content type that never should be displayed on its own page, like an image content type that's displayed in a carousel. Rabbit Hole can prevent this node from being accessible on its own page, through node/xxx.


The module has a version for Drupal 7 and Drupal 8, although the later is still a beta version, on December, 2019.