### Godot version

4.1 beta 3

The same project works fine on 4.1 **beta 1 and beta 2.**

### System information

Tested on MacOS, Fedora and HTML5

### Issue description

I have a problem in version 4.1 beta 3 with a popup (popup panel). The first time it always displays correctly. Every subsequent time, I only see a black spot. 

[Nagranie ekranu z 2023-06-23 11-35-28.webm](https://github.com/godotengine/godot/assets/5132385/f7a7ad08-754c-4b4b-b594-b6880eff5f3d)

*The same if I show popup by methods like popup_centered.


### Steps to reproduce

I'm trying to reproduce it with a clean and minimal example, but unfortunately, without success. Maybe someone else has this issue or knows a way to reproduce it?

### Minimal reproduction project

I'm trying to create it.
return RID();
}
void TextureStorage::decal_initialize(RID p_rid) {
}
void TextureStorage::decal_set_size(RID p_decal, const Vector3 &p_size) {
}
void TextureStorage::decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) {
}
void TextureStorage::decal_set_emission_energy(RID p_decal, float p_energy) {
}
void TextureStorage::decal_set_albedo_mix(RID p_decal, float p_mix) {
}
void TextureStorage::decal_set_modulate(RID p_decal, const Color &p_modulate) {
}
void TextureStorage::decal_set_cull_mask(RID p_decal, uint32_t p_layers) {
}
void TextureStorage::decal_set_distance_fade(RID p_decal, bool p_enabled, float p_begin, float p_length) {
}
void TextureStorage::decal_set_fade(RID p_decal, float p_above, float p_below) {
}
void TextureStorage::decal_set_normal_fade(RID p_decal, float p_fade) {