### 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
tile_data_editor_dropdown_button->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_draw));
	tile_data_editor_dropdown_button->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_pressed));
	tile_data_editors_vbox->add_child(tile_data_editor_dropdown_button);
	tile_data_editor_dropdown_button->add_child(tile_data_editors_popup);
	tile_data_editors_tree = memnew(Tree);
	tile_data_editors_tree->set_hide_root(true);
	tile_data_editors_tree->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
	tile_data_editors_tree->set_h_scroll_enabled(false);
	tile_data_editors_tree->set_v_scroll_enabled(false);
	tile_data_editors_tree->connect("item_selected", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editors_tree_selected));
	tile_data_editors_popup->add_child(tile_data_editors_tree);
	tile_data_painting_editor_container = memnew(VBoxContainer);
	tile_data_painting_editor_container->set_h_size_flags(SIZE_EXPAND_FILL);
	tile_data_editors_vbox->add_child(tile_data_painting_editor_container);
	
	atlas_source_proxy_object = memnew(TileSetAtlasSourceProxyObject());
	atlas_source_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_atlas_source_proxy_object_changed));
	atlas_source_inspector = memnew(EditorInspector);
	atlas_source_inspector->set_v_size_flags(SIZE_EXPAND_FILL);
	atlas_source_inspector->set_show_categories(true);
	atlas_source_inspector->add_inspector_plugin(memnew(TileSourceInspectorPlugin));
	atlas_source_inspector->edit(atlas_source_proxy_object);
	middle_vbox_container->add_child(atlas_source_inspector);
	
	VBoxContainer *right_vbox_container = memnew(VBoxContainer);
	add_child(right_vbox_container);
	
	tool_settings = memnew(HBoxContainer);
	right_vbox_container->add_child(tool_settings);
	tool_settings_tile_data_toolbar_container = memnew(HBoxContainer);