Hi,
Visibility only allows to a node to display or not his content on screen.
But the code of a node with "visibility == false" will still be executed.
eg.
Add a 2d child node to your scene and set his visibility to false.
In this child node add this code:
func _process(delta):
print ("running....")
Then run the scene, you will see that the hidden node will run the code.
Edit:
If you want the code to be executed only when the node is visible you can use this:
func _process(delta):
if self.visible:
print ("running....")
cheers