### Godot version

4.0 621d68e4129e7e343ff21eb3a5f4e8c1d6bbf456

### System information

Ubuntu 22.04 CI 

### Issue description

```
PlaceholderCubemapArray.new()
```
leaks memory only in GLES3
```
ERROR: Cubemap Arrays are not supported in the GL Compatibility backend.
   at: texture_2d_layered_initialize (drivers/gles3/storage/texture_storage.cpp:757)
ERROR: Attempting to use an uninitialized RID
   at: get_or_null (./core/templates/rid_owner.h:198)
ERROR: Condition "!t" is true.
   at: texture_free (drivers/gles3/storage/texture_storage.cpp:700)
WARNING: Could not create texture atlas, status: 0
     at: update_texture_atlas (drivers/gles3/storage/texture_storage.cpp:1581)
ERROR: 1 RID allocations of type 'N5GLES37TextureE' were leaked at exit.
```

### Steps to reproduce

Above

### Minimal reproduction project

Above
#ifndef PLACEHOLDER_TEXTURES_H
#define PLACEHOLDER_TEXTURES_H
#include "scene/resources/texture.h"
class PlaceholderTexture2D : public Texture2D {
	GDCLASS(PlaceholderTexture2D, Texture2D)
	RID rid;
	Size2 size = Size2(1, 1);
protected:
	static void _bind_methods();
public:
	void set_size(Size2 p_size);
	virtual int get_width() const override;
	virtual int get_height() const override;
	virtual RID get_rid() const override;
	virtual bool has_alpha() const override;
	virtual Ref<Image> get_image() const override;
	PlaceholderTexture2D();
	~PlaceholderTexture2D();
};
class PlaceholderTexture3D : public Texture3D {