### 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


Array images;
	for (int i = 0; i < p_state->images.size(); i++) {
		Dictionary d;
		ERR_CONTINUE(p_state->images[i].is_null());
		Ref<Image> image = p_state->images[i]->get_image();
		ERR_CONTINUE(image.is_null());
		if (p_path.to_lower().ends_with("glb") || p_path.is_empty()) {
			GLTFBufferViewIndex bvi;
			Ref<GLTFBufferView> bv;
			bv.instantiate();
			const GLTFBufferIndex bi = 0;
			bv->buffer = bi;
			bv->byte_offset = p_state->buffers[bi].size();
			ERR_FAIL_INDEX_V(bi, p_state->buffers.size(), ERR_PARAMETER_RANGE_ERROR);
			Vector<uint8_t> buffer;
			Ref<ImageTexture> img_tex = image;
			if (img_tex.is_valid()) {
				image = img_tex->get_image();
			}
			Error err = PNGDriverCommon::image_to_png(image, buffer);
			ERR_FAIL_COND_V_MSG(err, err, "Can't convert image to PNG.");
			bv->byte_length = buffer.size();
			p_state->buffers.write[bi].resize(p_state->buffers[bi].size() + bv->byte_length);
			memcpy(&p_state->buffers.write[bi].write[bv->byte_offset], buffer.ptr(), buffer.size());
			ERR_FAIL_COND_V(bv->byte_offset + bv->byte_length > p_state->buffers[bi].size(), ERR_FILE_CORRUPT);
			p_state->buffer_views.push_back(bv);
			bvi = p_state->buffer_views.size() - 1;