### Godot version

0810ecaafdbee3ea747219e6ab3a8de5d2216a09

### System information

Windows 11, Nvidia 3000, firefox

### Issue description

Exporting the gltf file is corrupt in blender.

### Steps to reproduce

1. Open project.
2. Export as glb
3. Open in blender
4. Blender display many warnings

![image](https://user-images.githubusercontent.com/32321/216740742-de662c5c-f5c3-44b5-a36e-8ad33defdbba.png)


### Minimal reproduction project

https://cdn.discordapp.com/attachments/598003845657788438/1071249610896580691/Test_Game_Project.zip


for (int i = 0; i < p_state->texture_samplers.size(); ++i) {
		if (p_state->texture_samplers[i]->get_filter_mode() == p_filter_mode) {
			return i;
		}
	}
	GLTFTextureSamplerIndex gltf_sampler_i = p_state->texture_samplers.size();
	Ref<GLTFTextureSampler> gltf_sampler;
	gltf_sampler.instantiate();
	gltf_sampler->set_filter_mode(p_filter_mode);
	gltf_sampler->set_wrap_mode(p_repeats);
	p_state->texture_samplers.push_back(gltf_sampler);
	return gltf_sampler_i;
}
Ref<GLTFTextureSampler> GLTFDocument::_get_sampler_for_texture(Ref<GLTFState> p_state, const GLTFTextureIndex p_texture) {
	ERR_FAIL_INDEX_V(p_texture, p_state->textures.size(), Ref<Texture2D>());
	const GLTFTextureSamplerIndex sampler = p_state->textures[p_texture]->get_sampler();
	if (sampler == -1) {
		return p_state->default_texture_sampler;
	} else {
		ERR_FAIL_INDEX_V(sampler, p_state->texture_samplers.size(), Ref<GLTFTextureSampler>());
		return p_state->texture_samplers[sampler];
	}
}
Error GLTFDocument::_serialize_texture_samplers(Ref<GLTFState> p_state) {