### Godot version

4.0.beta12

### System information

Windows 11, RTX 3080

### Issue description

When a Window Node is created with it's Transparent flag set to true and Project Settings --> Display --> Window --> Subwindows --> Embed Subwindows is false, the Window has a black background. By cycling the transparent flag from false and back to true again, during runtime, the window's background then becomes transparent. 

### Steps to reproduce

Attempt to create a Non-embedded Subwindow with a transparent background using the appropriate flags. 

### Minimal reproduction project

Note: this project is from Reddit user [gongpha](https://www.reddit.com/user/gongpha/) and his Reddit post [Learning a Godot 4.0 Window node](https://www.reddit.com/r/godot/comments/xr8yxn/learning_a_godot_40_window_node/)

https://github.com/gongpha/godot4-window-test
_THREAD_SAFE_METHOD_
	Ref<FileAccess> f = FileAccess::open(p_filename, FileAccess::READ);
	ERR_FAIL_COND_MSG(f.is_null(), "Cannot open file with icon '" + p_filename + "'.");
	ICONDIR *icon_dir = (ICONDIR *)memalloc(sizeof(ICONDIR));
	int pos = 0;
	icon_dir->idReserved = f->get_32();
	pos += sizeof(WORD);
	f->seek(pos);
	icon_dir->idType = f->get_32();
	pos += sizeof(WORD);
	f->seek(pos);
	ERR_FAIL_COND_MSG(icon_dir->idType != 1, "Invalid icon file format!");
	icon_dir->idCount = f->get_32();
	pos += sizeof(WORD);
	f->seek(pos);
	icon_dir = (ICONDIR *)memrealloc(icon_dir, sizeof(ICONDIR) - sizeof(ICONDIRENTRY) + icon_dir->idCount * sizeof(ICONDIRENTRY));
	f->get_buffer((uint8_t *)&icon_dir->idEntries[0], icon_dir->idCount * sizeof(ICONDIRENTRY));
	int small_icon_index = -1; 
	int small_icon_cc = 0;
	int big_icon_index = -1; 
	int big_icon_width = 16;
	int big_icon_cc = 0;
	for (int i = 0; i < icon_dir->idCount; i++) {
		int colors = (icon_dir->idEntries[i].bColorCount == 0) ? 32768 : icon_dir->idEntries[i].bColorCount;
		int width = (icon_dir->idEntries[i].bWidth == 0) ? 256 : icon_dir->idEntries[i].bWidth;
		if (width == 16) {
			if (colors >= small_icon_cc) {
				small_icon_index = i;
				small_icon_cc = colors;
			}