### 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.
}
AABB TextureStorage::decal_get_aabb(RID p_decal) const {
	return AABB();
}
GLuint TextureStorage::system_fbo = 0;
void TextureStorage::_update_render_target(RenderTarget *rt) {
	
	if (rt->size.x <= 0 || rt->size.y <= 0) {
		return;
	}
	
	if (rt->direct_to_screen) {
		rt->fbo = system_fbo;
		return;
	}
	Config *config = Config::get_singleton();
	rt->color_internal_format = rt->is_transparent ? GL_RGBA8 : GL_RGB10_A2;
	rt->color_format = GL_RGBA;
	rt->color_type = rt->is_transparent ? GL_UNSIGNED_BYTE : GL_UNSIGNED_INT_2_10_10_10_REV;
	rt->image_format = Image::FORMAT_RGBA8;
	glDisable(GL_SCISSOR_TEST);
	glColorMask(1, 1, 1, 1);
	glDepthMask(GL_FALSE);
	{
		Texture *texture;
		bool use_multiview = rt->view_count > 1 && config->multiview_supported;
		GLenum texture_target = use_multiview ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D;
		
		glGenFramebuffers(1, &rt->fbo);