### 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
return size.x;
}
int PlaceholderTextureLayered::get_height() const {
	return size.y;
}
int PlaceholderTextureLayered::get_layers() const {
	return layers;
}
bool PlaceholderTextureLayered::has_mipmaps() const {
	return false;
}
Ref<Image> PlaceholderTextureLayered::get_layer_data(int p_layer) const {
	return Ref<Image>();
}
void PlaceholderTextureLayered::_bind_methods() {
	ClassDB::bind_method(D_METHOD("set_size", "size"), &PlaceholderTextureLayered::set_size);
	ClassDB::bind_method(D_METHOD("get_size"), &PlaceholderTextureLayered::get_size);
	ClassDB::bind_method(D_METHOD("set_layers", "layers"), &PlaceholderTextureLayered::set_layers);
	ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "size", PROPERTY_HINT_NONE, "suffix:px"), "set_size", "get_size");
	ADD_PROPERTY(PropertyInfo(Variant::INT, "layers", PROPERTY_HINT_RANGE, "1,4096"), "set_layers", "get_layers");
}
PlaceholderTextureLayered::PlaceholderTextureLayered(LayeredType p_type) {
	layered_type = p_type;
	rid = RS::get_singleton()->texture_2d_layered_placeholder_create(RS::TextureLayeredType(layered_type));
}
PlaceholderTextureLayered::~PlaceholderTextureLayered() {
	ERR_FAIL_NULL(RenderingServer::get_singleton());
	RS::get_singleton()->free(rid);
}