### Godot version

v4.0.beta14.official [28a24639c]
v4.0.1.stable.official [cacf49999]

### System information

Windows 11 22H2, Forward+, NVIDIA MX350 (528.02) and NVIDIA RTX2070 (517.00)
Ubuntu 22.04, Forward+, NVIDIA MX350 (525.85.05)

### Issue description

Instancing a GPUParticles3D can cause colored flashes on screen. In some cases (such as the minimal reproduction project), the flashes are small, however in my other project I have seen them fill the screen. I am still unsure what causes the different sizes

These are some example correct frames from the minimal reproduction project (the effect is supposed to be a fireball.)

<img width="578" alt="image" src="https://user-images.githubusercontent.com/8741983/214133602-ff0e5916-fa0b-4e52-8dac-9701b8220a1d.png">

<img width="578" alt="image" src="https://user-images.githubusercontent.com/8741983/214133646-c976fde1-569c-4d0a-9395-fd037f21e0b9.png">

These are some example incorrect frames.

<img width="578" alt="image" src="https://user-images.githubusercontent.com/8741983/214133760-8e4804e8-f194-4d31-b943-0d93ab6d60cb.png">

<img width="578" alt="image" src="https://user-images.githubusercontent.com/8741983/214132553-c6d4be93-5373-43b5-b52e-d9a33924e9bf.png">


### Steps to reproduce

Create two scenes, one with a GPUParticles3D, and one that instances those particles repeatedly, using a script. Flashes will occur on screen.

### Minimal reproduction project

[Particle Flash MRP.zip](https://github.com/godotengine/godot/files/10483071/Particle.Flash.MRP.zip)


Edit 1: Corrected driver version for my friend's computer.
Edit 2: Added note about the issue also appearing on Linux, and that the issue is still present in 4.0.1

*Bugsquad edit (keywords for easier searching): flicker, flickering*
GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton();
	uint32_t userdata_count = 0;
	if (particles->process_material.is_valid()) {
		GLES3::ParticleProcessMaterialData *material_data = static_cast<GLES3::ParticleProcessMaterialData *>(material_storage->material_get_data(particles->process_material, RS::SHADER_PARTICLES));
		if (material_data && material_data->shader_data->version.is_valid() && material_data->shader_data->valid) {
			userdata_count = material_data->shader_data->userdata_count;
		}
	}
	if (userdata_count != particles->userdata_count) {
		
		_particles_free_data(particles);
	}
	if (particles->amount > 0 && particles->front_process_buffer == 0) {
		int total_amount = particles->amount;
		particles->userdata_count = userdata_count;
		uint32_t xform_size = particles->mode == RS::PARTICLES_MODE_2D ? 2 : 3;
		particles->instance_buffer_stride_cache = sizeof(float) * 4 * (xform_size + 1);
		particles->instance_buffer_size_cache = particles->instance_buffer_stride_cache * total_amount;
		particles->num_attrib_arrays_cache = 5 + userdata_count + (xform_size - 2);
		particles->process_buffer_stride_cache = sizeof(float) * 4 * particles->num_attrib_arrays_cache;
		int process_data_amount = 4 * particles->num_attrib_arrays_cache * total_amount;
		float *data = memnew_arr(float, process_data_amount);
		for (int i = 0; i < process_data_amount; i++) {
			data[i] = 0;
		}
		{
			glGenVertexArrays(1, &particles->front_vertex_array);
			glBindVertexArray(particles->front_vertex_array);
			glGenBuffers(1, &particles->front_process_buffer);
			glGenBuffers(1, &particles->front_instance_buffer);