### Godot version

Godot 4.0 beta 14

### System information

Debian 11, X11 Nvidia proprietary driver, GLES3 Compatibility

### Issue description

When creating a new scene and add a Sprite2D node, the node image becomes corrupted when selecting the root node.
The problem is gone after saving & re-opening the editor.

![Screenshot from 2023-01-24 12-19-24](https://user-images.githubusercontent.com/94308700/214218462-979ed804-6128-4fbb-87d3-286de9db9e7f.png)

Selecting the root node:
![Screenshot from 2023-01-24 12-19-35](https://user-images.githubusercontent.com/94308700/214218528-944083f4-f5fc-4088-a6c8-7702215ce1a0.png)

The resource preview is wrong too.
![Screenshot from 2023-01-24 12-19-48](https://user-images.githubusercontent.com/94308700/214218557-34177eba-98cc-46aa-86f3-9f613899137a.png)


### Steps to reproduce

Pretty straightforward.

### Minimal reproduction project

Any sprite will do, i think.
ner.get_or_null(p_render_target);
	ERR_FAIL_COND_V(!rt, false);
	return rt->is_transparent;
}
void TextureStorage::render_target_set_direct_to_screen(RID p_render_target, bool p_direct_to_screen) {
	RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
	ERR_FAIL_COND(!rt);
	if (p_direct_to_screen == rt->direct_to_screen) {
		return;
	}
	
	
	_clear_render_target(rt);
	rt->direct_to_screen = p_direct_to_screen;
	if (rt->direct_to_screen) {
		rt->overridden.color = RID();
		rt->overridden.depth = RID();
		rt->overridden.velocity = RID();
	}
	_update_render_target(rt);
}
bool TextureStorage::render_target_get_direct_to_screen(RID p_render_target) const {
	RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
	ERR_FAIL_COND_V(!rt, false);
	return rt->direct_to_screen;
}
bool TextureStorage::render_target_was_used(RID p_render_target) const {
	RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
	ERR_FAIL_COND_V(!rt, false);
	return rt->used_in_frame;
}
void TextureStorage::render_target_clear_used(RID p_render_target) {
	RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
	ERR_FAIL_COND(!rt);
	rt->used_in_frame = false;
}
void TextureStorage::render_target_set_msaa(RID p_render_target, RS::ViewportMSAA p_msaa) {
	RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
	ERR_FAIL_COND(!rt);
	if (p_msaa == rt->msaa) {
		return;
	}
	WARN_PRINT("2D MSAA is not yet supported for GLES3.");
	_clear_render_target(rt);
	rt->msaa = p_msaa;
	_update_render_target(rt);
}
RS::ViewportMSAA TextureStorage::render_target_get_msaa(RID p_render_target) const {
	RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
	ERR_FAIL_COND_V(!rt, RS::VIEWPORT_MSAA_DISABLED);
	return rt->msaa;
}
void TextureStorage::render_target_request_clear(RID p_render_target, const Color &p_clear_color) {
	RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
	ERR_FAIL_COND(!rt);
	rt->clear_requested = true;
