### Godot version

4.0 Stable

### System information

Windows 11, Nvidia RTX 3070ti, Ryzen 2600. Driver Version: 531.18, Vulkan

### Issue description

Baking a Lightmap on a Scene that isn't Saved and only has the LightmapGi node itself inside crashes the editor.

I'm not sure how to provide Error Logs, because I don't know where to find them.
(There aren't any log files in ```C:\Users\USERNAME\AppData\Roaming\Godot\app_userdata\projectTest```, I'm not sure if the crash logs are saved there though.)

### Steps to reproduce

1: Open a new Scene that is using the LightmapGi as the Base Node (don't save the Scene!)
2: Press the "Bake Lightmaps" button
3: Editor crashes.

### Minimal reproduction project

N/A
return p_object->is_class("LightmapGI");
}
void LightmapGIEditorPlugin::make_visible(bool p_visible) {
	if (p_visible) {
		bake->show();
	} else {
		bake->hide();
	}
}
EditorProgress *LightmapGIEditorPlugin::tmp_progress = nullptr;
bool LightmapGIEditorPlugin::bake_func_step(float p_progress, const String &p_description, void *, bool p_refresh) {
	if (!tmp_progress) {
		tmp_progress = memnew(EditorProgress("bake_lightmaps", TTR("Bake Lightmaps"), 1000, false));
		ERR_FAIL_COND_V(tmp_progress == nullptr, false);
	}
	return tmp_progress->step(p_description, p_progress * 1000, p_refresh);
}
void LightmapGIEditorPlugin::bake_func_end(uint64_t p_time_started) {
	if (tmp_progress != nullptr) {
		memdelete(tmp_progress);
		tmp_progress = nullptr;
	}
	const int time_taken = (OS::get_singleton()->get_ticks_msec() - p_time_started) * 0.001;
	print_line(vformat("Done baking lightmaps in %02d:%02d:%02d.", time_taken / 3600, (time_taken % 3600) / 60, time_taken % 60));
	
	
	
	DisplayServer::get_singleton()->window_request_attention();
}
void LightmapGIEditorPlugin::_bind_methods() {