### 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
source_sort_button = memnew(MenuButton);
	source_sort_button->set_flat(true);
	source_sort_button->set_tooltip_text(TTR("Sort Sources"));
	PopupMenu *p = source_sort_button->get_popup();
	p->connect("id_pressed", callable_mp(this, &TileSetEditor::_set_source_sort));
	p->add_radio_check_item(TTR("Sort by ID (Ascending)"), TilesEditorUtils::SOURCE_SORT_ID);
	p->add_radio_check_item(TTR("Sort by ID (Descending)"), TilesEditorUtils::SOURCE_SORT_ID_REVERSE);
	p->add_radio_check_item(TTR("Sort by Name (Ascending)"), TilesEditorUtils::SOURCE_SORT_NAME);
	p->add_radio_check_item(TTR("Sort by Name (Descending)"), TilesEditorUtils::SOURCE_SORT_NAME_REVERSE);
	p->set_item_checked(TilesEditorUtils::SOURCE_SORT_ID, true);
	sources_list = memnew(ItemList);
	sources_list->set_fixed_icon_size(Size2(60, 60) * EDSCALE);
	sources_list->set_h_size_flags(SIZE_EXPAND_FILL);
	sources_list->set_v_size_flags(SIZE_EXPAND_FILL);
	sources_list->connect("item_selected", callable_mp(this, &TileSetEditor::_source_selected));
	sources_list->connect("item_selected", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::set_sources_lists_current));
	sources_list->connect("visibility_changed", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::synchronize_sources_list).bind(sources_list, source_sort_button));
	sources_list->add_user_signal(MethodInfo("sort_request"));
	sources_list->connect("sort_request", callable_mp(this, &TileSetEditor::_update_sources_list).bind(-1));
	sources_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
	SET_DRAG_FORWARDING_CDU(sources_list, TileSetEditor);
	split_container_left_side->add_child(sources_list);
	HBoxContainer *sources_bottom_actions = memnew(HBoxContainer);
	sources_bottom_actions->set_alignment(BoxContainer::ALIGNMENT_END);
	split_container_left_side->add_child(sources_bottom_actions);
	sources_delete_button = memnew(Button);
	sources_delete_button->set_flat(true);
	sources_delete_button->set_disabled(true);
	sources_delete_button->connect("pressed", callable_mp(this, &TileSetEditor::_source_delete_pressed));
	sources_bottom_actions->add_child(sources_delete_button);