### Godot version

4.1.stable

### System information

Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Compatibility) - Intel(R) HD Graphics 4600 (Intel Corporation; 20.19.15.5126) - Intel(R) Core(TM) i3-4330 CPU @ 3.50GHz (4 Threads)

### Issue description

When I try to join 68 images of 128x128 resolution in an atlas it returns a transparent 1x1 image

I tried using few images and it doesn't work either

It doesn't work either with 16x16, 32x32, 64x64 resolutions

- Google Translate :)

### Steps to reproduce


https://github.com/godotengine/godot/assets/136469511/ca5f64c2-f0c5-486f-a13e-b941ae2dea7d



### Minimal reproduction project

N/A
sources_add_button = memnew(MenuButton);
	sources_add_button->set_flat(true);
	sources_add_button->get_popup()->add_item(TTR("Atlas"));
	sources_add_button->get_popup()->add_item(TTR("Scenes Collection"));
	sources_add_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetEditor::_source_add_id_pressed));
	sources_bottom_actions->add_child(sources_add_button);
	sources_advanced_menu_button = memnew(MenuButton);
	sources_advanced_menu_button->set_flat(true);
	sources_advanced_menu_button->get_popup()->add_item(TTR("Open Atlas Merging Tool"));
	sources_advanced_menu_button->get_popup()->add_item(TTR("Manage Tile Proxies"));
	sources_advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetEditor::_sources_advanced_menu_id_pressed));
	sources_bottom_actions->add_child(sources_advanced_menu_button);
	sources_bottom_actions->add_child(source_sort_button);
	atlas_merging_dialog = memnew(AtlasMergingDialog);
	add_child(atlas_merging_dialog);
	tile_proxies_manager_dialog = memnew(TileProxiesManagerDialog);
	add_child(tile_proxies_manager_dialog);
	
	VBoxContainer *split_container_right_side = memnew(VBoxContainer);
	split_container_right_side->set_h_size_flags(SIZE_EXPAND_FILL);
	split_container_right_side->set_v_size_flags(SIZE_EXPAND_FILL);
	split_container->add_child(split_container_right_side);
	
	no_source_selected_label = memnew(Label);
	no_source_selected_label->set_text(TTR("No TileSet source selected. Select or create a TileSet source.\nYou can create a new source by using the Add button on the left or by dropping a tileset texture onto the source list."));
	no_source_selected_label->set_h_size_flags(SIZE_EXPAND_FILL);
	no_source_selected_label->set_v_size_flags(SIZE_EXPAND_FILL);
	no_source_selected_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
	no_source_selected_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
	split_container_right_side->add_child(no_source_selected_label);