I need to test whether a user is creating a new node as opposed to editing an existing node in a custom #submit function added to a node edit/creation form.
I can access the node via
$node = $form_state->getFormObject()->getEntity();
$node->id() - gives the new node ID so cant be used.
$node->get('nid') - also gives an gives the new node ID so cant be used.
$node->isNew() - This is actually FALSE in this hook despite it being new content.