Ok, here is a trick: in my case, the file with GCP credentials is stored in notebook workspace storage, which is not visible to os.environ() command.
So solution is to read a content of this file, and save it to the cluster storage attached to the notebook, which is created with the cluster and is erased when cluster is gone (so we need to repeat this procedure every time the cluster is re-created). According to this link, we can read the content of the credentials json file stored in notebook workspace with
with open('/Workspace/folder1/cred.json'): #note that I need a full path here, for some reason
content = f.read()
and then according to his doc,, we need to save it on another place in a new file (with the same name in my case, cred.json), namely on cluster storage attached to the notebook (which is visible to os-related functions, like os.environ()), with
fd = os.open("cred.json", os.O_RDWR|os.O_CREAT)
ret = os.write(fd,content.encode())
#need to add .encode(), or will get TypeError: a bytes-like object is required, not 'str'
os.close(fd)
Only after that we can continue with setting an environment variable, required for GCP authentication:
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] ='./cred.json'
and then API calls should work fine, without DefaultCredentialsError.