### 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.
rt->backbuffer_depth = 0;
	}
	_render_target_clear_sdf(rt);
}
RID TextureStorage::render_target_create() {
	RenderTarget render_target;
	render_target.used_in_frame = false;
	render_target.clear_requested = false;
	Texture t;
	t.active = true;
	t.render_target = &render_target;
	t.is_render_target = true;
	render_target.texture = texture_owner.make_rid(t);
	_update_render_target(&render_target);
	return render_target_owner.make_rid(render_target);
}
void TextureStorage::render_target_free(RID p_rid) {
	RenderTarget *rt = render_target_owner.get_or_null(p_rid);
	_clear_render_target(rt);
	Texture *t = get_texture(rt->texture);
	if (t) {
		t->is_render_target = false;
		if (rt->overridden.color.is_null()) {
			texture_free(rt->texture);
		}
		
	}
	render_target_owner.free(p_rid);
}
void TextureStorage::render_target_set_position(RID p_render_target, int p_x, int p_y) {