### Godot version

v4.1.stable.official [970459615]

### System information

Godot v4.1.stable - Windows 10.0.22621 (this is what "copy system info" says, but I'm running Windows 11 Home) - Vulkan (Compatibility) - NVIDIA GeForce RTX 4090 (NVIDIA; 31.0.15.3168) - 12th Gen Intel(R) Core(TM) i7-12700F (20 Threads)

### Issue description

Adding a NoiseTexture3D to a Visual Shader crashes Godot.

### Steps to reproduce

- In a new project, create a "MeshInstance3D"
- Set the mesh to any mesh that has the "Surface Material Overide" property (New BoxMesh for instance)
- In said property, create a "New ShaderMaterial"
- Set the ShaderMaterial's shader to a new shader, with the type: "VisualShader"
- Edit the VisualShader
- Add a Texture3D node
- Set the texture to "New NoiseTexture3D"

Godot then crashes (note, the crash takes place even if you remove the "MeshInstance3D")

### Minimal reproduction project

N/A
if (p_property.name == "seamless_blend_skirt") {
		if (!seamless) {
			p_property.usage = PROPERTY_USAGE_NO_EDITOR;
		}
	}
}
void NoiseTexture3D::_set_texture_data(const TypedArray<Image> &p_data) {
	if (!p_data.is_empty()) {
		Vector<Ref<Image>> data;
		data.resize(p_data.size());
		for (int i = 0; i < data.size(); i++) {
			data.write[i] = p_data[i];
		}
		if (texture.is_valid()) {
			RID new_texture = RS::get_singleton()->texture_3d_create(data[0]->get_format(), data[0]->get_width(), data[0]->get_height(), data.size(), false, data);
			RS::get_singleton()->texture_replace(texture, new_texture);
		} else {
			texture = RS::get_singleton()->texture_3d_create(data[0]->get_format(), data[0]->get_width(), data[0]->get_height(), data.size(), false, data);
		}
	}
	emit_changed();
}
void NoiseTexture3D::_thread_done(const TypedArray<Image> &p_data) {