### Godot version

4.1.beta3 (anything after #77224), master (030c1a950e8cee19e72104b4fb79caba17a2d678)

### System information

GLES3 (compatibility renderer)

### Issue description

After #77224 Godot would crash for me on start with compatibility renderer.

I was getting `Access violation reading location 0x00000000` crash in the GPU driver after:
https://github.com/godotengine/godot/blob/030c1a950e8cee19e72104b4fb79caba17a2d678/drivers/gles3/storage/texture_storage.cpp#L1319

when it was setting the `1`-level mipmap (`i == 1`) within:
https://github.com/godotengine/godot/blob/030c1a950e8cee19e72104b4fb79caba17a2d678/drivers/gles3/storage/texture_storage.cpp#L78


After debugging a little the issue seems to be that the filtering is set by default to nearest, and this results in setting max mipmap level to 0. But for textures with mipmaps it shouldn't be done like that I guess. :thinking:
https://github.com/godotengine/godot/blob/030c1a950e8cee19e72104b4fb79caba17a2d678/drivers/gles3/storage/texture_storage.cpp#L1252-L1253
https://github.com/godotengine/godot/blob/030c1a950e8cee19e72104b4fb79caba17a2d678/drivers/gles3/storage/texture_storage.h#L260-L264
https://github.com/godotengine/godot/blob/030c1a950e8cee19e72104b4fb79caba17a2d678/drivers/gles3/storage/texture_storage.h#L306

Commenting out the `max_lod = 0;` so the max level ends up being the default `1000` fixes the crash for me.

cc @clayjohn Not sure what's the proper fix here. Whether it's just a matter of changing the filtering for mipmapped textures, or not limiting mipmap levels like that for nereast filtered etc. textures, or whatever else. But it should probably be fixed for 4.1.stable (hence the milestone).

### Steps to reproduce

Try to open Godot (project manager).

### Minimal reproduction project

N/A
glDeleteTextures(E.value.allocated_textures.size(), E.value.allocated_textures.ptr());
		
		if (E.value.fbo != rt->fbo) {
			glDeleteFramebuffers(1, &E.value.fbo);
		}
	}
	rt->overridden.fbo_cache.clear();
	if (rt->fbo) {
		glDeleteFramebuffers(1, &rt->fbo);
		rt->fbo = 0;
	}
	if (rt->overridden.color.is_null()) {
		if (rt->texture.is_valid()) {
			Texture *tex = get_texture(rt->texture);
			tex->alloc_height = 0;
			tex->alloc_width = 0;
			tex->width = 0;
			tex->height = 0;
			tex->active = false;
			tex->render_target = nullptr;
			tex->is_render_target = false;
			tex->gl_set_filter(RS::CANVAS_ITEM_TEXTURE_FILTER_MAX);
			tex->gl_set_repeat(RS::CANVAS_ITEM_TEXTURE_REPEAT_MAX);
		}
	} else {
		Texture *tex = get_texture(rt->overridden.color);
		tex->render_target = nullptr;
		tex->is_render_target = false;
	}
	if (rt->overridden.color.is_valid()) {