### Godot version

9f12e7b52d944

### System information

arch linux

### Issue description

Attempting to edit from the editor a typed array exported from a tool script fails, any value is immediately reset, setters are never called.

### Steps to reproduce

Create a script such as follows and try to add and then change items of the array in the inspector.


```gdscript
@tool
extends Node

@export var x: Array[String]
```

### Minimal reproduction project

n/a
Button *button = Object::cast_to<Button>(p_button);
	changing_type_index = p_index;
	Rect2 rect = button->get_screen_rect();
	change_type->reset_size();
	change_type->set_position(rect.get_end() - Vector2(change_type->get_contents_minimum_size().x, 0));
	change_type->popup();
}
void EditorPropertyArray::_change_type_menu(int p_index) {
	if (p_index == Variant::VARIANT_MAX) {
		_remove_pressed(changing_type_index);
		return;
	}
	Variant value;
	VariantInternal::initialize(&value, Variant::Type(p_index));
	Variant array = object->get_array().duplicate();
	array.set(changing_type_index, value);
	emit_changed(get_edited_property(), array, "", true);
	update_property();
}
void EditorPropertyArray::_object_id_selected(const StringName &p_property, ObjectID p_id) {