### Godot version

v4.0.beta.custom_build [291add339]

### System information

Windows 10, Forward+, NVIDIA GeForce GTX 1050 Ti (31.0.15.1694)

### Issue description

I was testing if #69669 was solved by #70418, which it seemed to be. However, I got a wall of errors at the same time.

In the minimal reproduction project below in this Issue, I get errors when instantiating many of the same `GPUParticle2D` scene. In my earlier Godot 4 build (v4.0.beta.custom_build [2a04b18d3]) I did not get any errors (but got the occasional artifact as was my original issue in #69669).

I suspect the PR #70418 solved the artifact, but possibly introduced new bugs. However, I have not specifically built Godot with, and without the PR in question.

I believe this is the start and end of the errors - after which they repeat.
![wall_of_errors](https://user-images.githubusercontent.com/10490534/209046500-9813150c-d6e4-4a11-8e62-79d370d07009.png)

### Steps to reproduce

- Create a GPUParticle2D scene
- Instantiate the scene several times
- Observe the debugger get flooded with errors

### Minimal reproduction project

This project only instantiates default GPUParticle2D scenes with a default particle material.
[GPU_Particle_Creation_Bug.zip](https://github.com/godotengine/godot/files/10283416/GPU_Particle_Creation_Bug.zip)

atlas_rect.size.width = shadow_size;
		atlas_rect.size.height = shadow_size;
		zfar = light_storage->light_get_param(base, RS::LIGHT_PARAM_RANGE);
		if (light_storage->light_get_type(base) == RS::LIGHT_OMNI) {
			bool wrap = (shadow + 1) % subdivision == 0;
			dual_paraboloid_offset = wrap ? Vector2i(1 - subdivision, 1) : Vector2i(1, 0);
			if (light_storage->light_omni_get_shadow_mode(base) == RS::LIGHT_OMNI_SHADOW_CUBE) {
				render_texture = light_storage->get_cubemap(shadow_size / 2);
				render_fb = light_storage->get_cubemap_fb(shadow_size / 2, p_pass);
				light_projection = light_storage->light_instance_get_shadow_camera(p_light, p_pass);
				light_transform = light_storage->light_instance_get_shadow_transform(p_light, p_pass);
				render_cubemap = true;
				finalize_cubemap = p_pass == 5;
				atlas_fb = light_storage->shadow_atlas_get_fb(p_shadow_atlas);
				atlas_size = shadow_atlas_size;
				if (p_pass == 0) {
					_render_shadow_begin();
				}
			} else {
				atlas_rect.position.x += 1;
				atlas_rect.position.y += 1;
				atlas_rect.size.x -= 2;
				atlas_rect.size.y -= 2;
				atlas_rect.position += p_pass * atlas_rect.size * dual_paraboloid_offset;
				light_projection = light_storage->light_instance_get_shadow_camera(p_light, 0);
				light_transform = light_storage->light_instance_get_shadow_transform(p_light, 0);
				using_dual_paraboloid = true;
				using_dual_paraboloid_flip = p_pass == 1;
				render_fb = light_storage->shadow_atlas_get_fb(p_shadow_atlas);
				flip_y = true;