### Godot version

4.1

### System information

Windows 11 AMD (Forward +)

### Issue description

Whenever I correct color via World Enviornment adjustments with a Curve, I get the error: 
E 0:00:02:0794   parse_message: Condition "p_args.size() < 10" is true. Returning: ERR_INVALID_DATA
  <C++ Source>   scene/debugger/scene_debugger.cpp:177 @ parse_message()

![image](https://github.com/godotengine/godot/assets/23708144/1b9d2c43-cf39-468c-bbdb-39ebb4521a41)

This is similar to #74697, where a curve was exported.
What is unclear to me:
Is the color correction correct? What is the meaning of the error? This does not happen in Godot3.

### Steps to reproduce

1. Open project and run it
2. Go to Camera, World Environment, Adjustments and Color Correction
3. Change points in Curve
Alternatively:
1. Change Curve to Gradient and run it
2. Change Gradient while running

### Minimal reproduction project

[ramp_test.zip](https://github.com/godotengine/godot/files/12082129/ramp_test.zip)

}
	}
	
	for (KeyValue<const Script *, HashMap<StringName, Variant>> &sc : constants) {
		for (const KeyValue<StringName, Variant> &E : sc.value) {
			String script_path = sc.key == p_script ? "" : sc.key->get_path().get_file() + "/";
			if (E.value.get_type() == Variant::OBJECT) {
				Variant inst_id = ((Object *)E.value)->get_instance_id();
				PropertyInfo pi(inst_id.get_type(), "Constants/" + E.key, PROPERTY_HINT_OBJECT_ID, "Object");
				properties.push_back(SceneDebuggerProperty(pi, inst_id));
			} else {
				PropertyInfo pi(E.value.get_type(), "Constants/" + script_path + E.key);
				properties.push_back(SceneDebuggerProperty(pi, E.value));
			}
		}
	}
}
void SceneDebuggerObject::serialize(Array &r_arr, int p_max_size) {
	Array send_props;
	for (int i = 0; i < properties.size(); i++) {
		const PropertyInfo &pi = properties[i].first;
		Variant &var = properties[i].second;
		Ref<Resource> res = var;
		Array prop;
		prop.push_back(pi.name);
		prop.push_back(pi.type);
		PropertyHint hint = pi.hint;
		String hint_string = pi.hint_string;
		if (!res.is_null() && !res->get_path().is_empty()) {
			var = res->get_path();