### Godot version

v4.2.dev.custom_build [8c1817f75]

### System information

Godot v4.2.dev (8c1817f75) - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3090 Ti (NVIDIA; 31.0.15.3699) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)

### Issue description

NOTE: This is a separate issue from https://github.com/godotengine/godot/issues/54679, as this can be reproduced with much smaller values like 2K and 4K resolution lightmaps.

The issue originates from this particular error handling.

https://github.com/godotengine/godot/blob/8c1817f755b63a69378774d8d0f74499f663afe2/modules/lightmapper_rd/lightmapper_rd.cpp#L174-L179

When this is true, the following code fails to catch the error correctly and will crash afterwards due to the data being invalid (Notice how none of the code references this particular error case).

https://github.com/godotengine/godot/blob/8c1817f755b63a69378774d8d0f74499f663afe2/scene/3d/lightmap_gi.cpp#L1083-L1087

It seems it was intended at some point to consider the error but it doesn't seem to account for it.

I've opened an issue to discuss what solution would be preferable:

1. We handle the error correctly, propagate it as best as possible and indicate to the user the exact problem instead of crashing.

2. We handle the error silently and clamp the light-map size to the max dimensions allowed. A console warning could be an interesting solution here. This would personally be my preferred behavior as I wouldn't want to have to fix the scaling in every mesh I've re-imported just to test a low resolution bake, which can be fairly common to iterate on lighting before doing the final bake.

### Steps to reproduce

1. Set LightmapGI's Max Texture Size to a small value (e.g. 2048).
2. Attempt to bake the lightmap for a mesh with a big enough size and texel size so that a texture bigger than LightmapGI's Max Texture Size is required.

### Minimal reproduction project

N/A
void _set_light_textures_data(const Array &p_data);
	Array _get_light_textures_data() const;
protected:
	static void _bind_methods();
public:
	void add_user(const NodePath &p_path, const Rect2 &p_uv_scale, int p_slice_index, int32_t p_sub_instance = -1);
	int get_user_count() const;
	NodePath get_user_path(int p_user) const;
	int32_t get_user_sub_instance(int p_user) const;
	Rect2 get_user_lightmap_uv_scale(int p_user) const;
	int get_user_lightmap_slice_index(int p_user) const;
	void clear_users();
	void set_light_texture(const Ref<TextureLayered> &p_light_texture);
	Ref<TextureLayered> get_light_texture() const;
	void set_uses_spherical_harmonics(bool p_enable);
	bool is_using_spherical_harmonics() const;
	bool is_interior() const;
	float get_baked_exposure() const;
	void set_capture_data(const AABB &p_bounds, bool p_interior, const PackedVector3Array &p_points, const PackedColorArray &p_point_sh, const PackedInt32Array &p_tetrahedra, const PackedInt32Array &p_bsp_tree, float p_baked_exposure);
	PackedVector3Array get_capture_points() const;
	PackedColorArray get_capture_sh() const;
	PackedInt32Array get_capture_tetrahedra() const;
	PackedInt32Array get_capture_bsp_tree() const;
	AABB get_capture_bounds() const;
	void clear();
	virtual RID get_rid() const override;
	LightmapGIData();
	~LightmapGIData();
};
class LightmapGI : public VisualInstance3D {