### Godot version

4 beta 10

### System information

win 11

### Issue description

So I have a very skinny tileset image. When I try to make a tile at the top of the image, it jumps down to some where in the middle. Why does it do this?

### Steps to reproduce

make a tileset with a skinny image

### Minimal reproduction project

none
alternative_tiles_rect_cache.clear();
	Rect2i current;
	for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
		Vector2i tile_id = tile_set_atlas_source->get_tile_id(i);
		int alternatives_count = tile_set_atlas_source->get_alternative_tiles_count(tile_id);
		Size2i texture_region_size = tile_set_atlas_source->get_tile_texture_region(tile_id).size;
		int line_height = 0;
		for (int j = 1; j < alternatives_count; j++) {
			int alternative_id = tile_set_atlas_source->get_alternative_tile_id(tile_id, j);
			TileData *tile_data = tile_set_atlas_source->get_tile_data(tile_id, alternative_id);
			bool transposed = tile_data->get_transpose();
			current.size = transposed ? Vector2i(texture_region_size.y, texture_region_size.x) : texture_region_size;
			
			if (!alternative_tiles_rect_cache.has(tile_id)) {
				alternative_tiles_rect_cache[tile_id] = HashMap<int, Rect2i>();
			}
			alternative_tiles_rect_cache[tile_id][alternative_id] = current;
			current.position.x += transposed ? texture_region_size.y : texture_region_size.x;
			line_height = MAX(line_height, transposed ? texture_region_size.x : texture_region_size.y);
		}
		current.position.x = 0;
		current.position.y += line_height;
	}
}
Vector3i TileAtlasView::get_alternative_tile_at_pos(const Vector2 p_pos) const {