### 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
int bottom_border = margins.y + (grid_size.y * (texture_region_size.y + separation.y));
		if (bottom_border < texture->get_size().y) {
			rect.position = Vector2i(0, bottom_border);
			rect.set_end(texture->get_size());
			base_tiles_draw->draw_texture_rect_region(texture, rect, rect);
			base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5));
		}
		
		rect.position = Vector2i(0, margins.y);
		rect.set_end(Vector2i(margins.x, margins.y + (grid_size.y * (texture_region_size.y + separation.y))));
		base_tiles_draw->draw_texture_rect_region(texture, rect, rect);
		base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5));
		
		int right_border = margins.x + (grid_size.x * (texture_region_size.x + separation.x));
		if (right_border < texture->get_size().x) {
			rect.position = Vector2i(right_border, margins.y);
			rect.set_end(Vector2i(texture->get_size().x, margins.y + (grid_size.y * (texture_region_size.y + separation.y))));
			base_tiles_draw->draw_texture_rect_region(texture, rect, rect);
			base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5));
		}
		
		for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
			Vector2i atlas_coords = tile_set_atlas_source->get_tile_id(i);
			for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(atlas_coords); frame++) {
				
				Rect2i base_frame_rect = tile_set_atlas_source->get_tile_texture_region(atlas_coords, frame);
				Vector2i offset_pos = base_frame_rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, 0);
				
				TileMap::draw_tile(base_tiles_draw->get_canvas_item(), offset_pos, tile_set, source_id, atlas_coords, 0, frame);
			}