How can I hide nodes from view, but open access to JSON:API at the same time? I would like to use Drupal as a decoupled system, sourcing its content by using Gatsby.
Having set it all up, I would like my Drupal nodes not to be accessed by random unauthenticated users so I removed the permission from 'View Content'.

Having done that now I can't access the content by my Front end service which uses JSON API (unauthenticated of course).

What's the method to remove the node pages from the site and leave only the admin backend, while allowing to access the content using JSON API ?
If you're working with unauthenticated consumers, the Rabbit Hole module has the means to disable node/* routes without using the user role/permission system. 

The Rabbit Hole module has a sub-module Rabbit Hole nodes that, when enabled, will let you disable node/* routes. This should leave open your jsonapi/* endpoints to anonymous consumers.