### Godot version

v4.0.rc4.official [e0de3573f]

### System information

macOS 13.2.1, 2.3 GHz Quad-Core Intel Core i7, Vulkan API 1.2.231 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) Iris(TM) Plus Graphics

### Issue description

Hiding a `CanvasModulate` node yield errors in the console.

<img width="590" alt="image" src="https://user-images.githubusercontent.com/2452791/221310681-0648e8e4-6afb-4492-9a93-e1dfe5c15ff2.png">

```
E 0:00:00:0988   get_canvas: Condition "!is_inside_tree()" is true. Returning: RID()
  <C++ Source>   scene/main/canvas_item.cpp:814 @ get_canvas()
E 0:00:00:0988   canvas_set_modulate: Condition "!canvas" is true.
  <C++ Source>   servers/rendering/renderer_canvas_cull.cpp:430 @ canvas_set_modulate()
E 0:00:00:0988   get_canvas: Condition "!is_inside_tree()" is true. Returning: RID()
  <C++ Source>   scene/main/canvas_item.cpp:814 @ get_canvas()
```
- https://github.com/godotengine/godot/blob/e0de3573f3fc86062763152f5a1ac62f5a986da3/scene/main/canvas_item.cpp#L814
- https://github.com/godotengine/godot/blob/e0de3573f3fc86062763152f5a1ac62f5a986da3/servers/rendering/renderer_canvas_cull.cpp#L430

I use a `CanvasModulate` node to add some ambient color to my scene and I usually toggle it on/off to have a better view of the scene, having it throw errors is a bit distracting.

### Steps to reproduce

- Create a `Node2D` scene

- Add a `CanvasModulate` child

- Run the Scene 
  - No error:
  <img width="1018" alt="image" src="https://user-images.githubusercontent.com/2452791/221312208-af897bb1-db0c-4a0e-b340-096a0e63c6fa.png">


- Hide the `CanvasModulate` by clicking the eye icon
- Run the Scene 
  - Errors:
  <img width="1027" alt="image" src="https://user-images.githubusercontent.com/2452791/221312325-0cafd9c6-18d3-4d4c-a6d2-ea4cf2c7e083.png">


### Minimal reproduction project

[test.zip](https://github.com/godotengine/godot/files/10829307/test.zip)

ClassDB::bind_method(D_METHOD("set_color", "color"), &CanvasModulate::set_color);
	ClassDB::bind_method(D_METHOD("get_color"), &CanvasModulate::get_color);
	ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
}
void CanvasModulate::set_color(const Color &p_color) {
	color = p_color;
	if (is_visible_in_tree()) {
		RS::get_singleton()->canvas_set_modulate(get_canvas(), color);
	}
}
Color CanvasModulate::get_color() const {
	return color;
}
PackedStringArray CanvasModulate::get_configuration_warnings() const {
	PackedStringArray warnings = Node::get_configuration_warnings();
	if (is_visible_in_tree() && is_inside_tree()) {
		List<Node *> nodes;
		get_tree()->get_nodes_in_group("_canvas_modulate_" + itos(get_canvas().get_id()), &nodes);
		if (nodes.size() > 1) {
			warnings.push_back(RTR("Only one visible CanvasModulate is allowed per scene (or set of instantiated scenes). The first created one will work, while the rest will be ignored."));
		}
	}
	return warnings;
}
CanvasModulate::CanvasModulate() {
}
CanvasModulate::~CanvasModulate() {
}