### Godot version

v4.0.stable.official [92bee43ad]

### System information

Windows10,64,OpenGL API 3.3.0 NVIDIA 425.25 - Compatibility - Using Device: NVIDIA Corporation - GeForce MX250

### Issue description

When I change the tileset texture area size, godot crashes with the following error

The tileset contains a 107*35 sprite sheet

```
ERROR: UndoRedo history mismatch: expected 0, got 2.
   at: (editor/editor_undo_redo_manager.cpp:108)
```

### Steps to reproduce

1. create a tilemap node
2. create a tileset
3. click the tileset
4. drag the spritesheet(107*35) into the tileset
5. click yes with "auto create tiles in non-tra... "pop
6. change the tileset texture region size
7. program freezes
8.
 ```
ERROR: UndoRedo history mismatch: expected 0, got 2.
   at: (editor/editor_undo_redo_manager.cpp:108)
```

### Minimal reproduction project

[test1.zip](https://github.com/godotengine/godot/files/10918599/test1.zip)

emit_changed(get_edited_property(), occluder);
		} else if (base_type == "NavigationPolygon") {
			Ref<NavigationPolygon> navigation_polygon;
			if (generic_tile_polygon_editor->get_polygon_count() >= 1) {
				navigation_polygon.instantiate();
				for (int i = 0; i < generic_tile_polygon_editor->get_polygon_count(); i++) {
					Vector<Vector2> polygon = generic_tile_polygon_editor->get_polygon(i);
					navigation_polygon->add_outline(polygon);
				}
				navigation_polygon->make_polygons_from_outlines();
			}
			emit_changed(get_edited_property(), navigation_polygon);
		}
	} else {
		if (base_type.is_empty()) {
			
			Vector<String> changed_properties;
			Array values;
			int count = generic_tile_polygon_editor->get_polygon_count();
			changed_properties.push_back(count_property);
			values.push_back(count);
			for (int i = 0; i < count; i++) {
				changed_properties.push_back(vformat(element_pattern, i));
				values.push_back(generic_tile_polygon_editor->get_polygon(i));
			}
			emit_signal(SNAME("multiple_properties_changed"), changed_properties, values, false);
		}
	}
}
void EditorPropertyTilePolygon::update_property() {