### Godot version

4.1 rc3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

This™
![image](https://github.com/godotengine/godot/assets/2223172/cb33110f-a5b0-400a-951f-3fa425f05714)

It can still happen, but it's more difficult to trigger.

### Steps to reproduce

1. Create a new scene with a Control node
2. Add Theme to the Control
3. Open Theme Editor
4. Clear the `theme` property in Control
5. Save, with Theme Editor opened
6. Restart

### Minimal reproduction project

N/A
} else if (dock_slot[i]->get_tab_count() == 0) {
			dock_select->draw_rect(r, unused);
		} else {
			dock_select->draw_rect(r, used);
		}
		for (int j = 0; j < MIN(3, dock_slot[i]->get_tab_count()); j++) {
			int xofs = (r.size.width / 3) * j;
			Color c = used;
			if (i == dock_popup_selected_idx && (dock_slot[i]->get_current_tab() > 3 || dock_slot[i]->get_current_tab() == j)) {
				c = tab_selected;
			}
			dock_select->draw_rect(Rect2(2 + ofs.x + xofs, ofs.y, r.size.width / 3 - 1, 3), c);
		}
	}
}
void EditorNode::_save_editor_layout() {
	if (waiting_for_first_scan) {
		return; 
	}
	Ref<ConfigFile> config;
	config.instantiate();
	
	config->load(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg"));
	_save_docks_to_config(config, "docks");
	_save_open_scenes_to_config(config);
	_save_central_editor_layout_to_config(config);
	editor_data.get_plugin_window_layout(config);
	config->save(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg"));
}
void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p_section) {