### 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
if (tile_set_atlas_source->get_tile_at_coords(coords) == TileSetSource::INVALID_ATLAS_COORDS) {
					Rect2i rect = Rect2i((texture_region_size + separation) * coords + margins, texture_region_size + separation);
					rect = rect.intersection(Rect2i(Vector2(), texture->get_size()));
					if (rect.size.x > 0 && rect.size.y > 0) {
						base_tiles_draw->draw_texture_rect_region(texture, rect, rect);
					}
				}
			}
		}
		
		for (int x = 0; x < grid_size.x; x++) {
			for (int y = 0; y < grid_size.y; y++) {
				Vector2i coords = Vector2i(x, y);
				if (tile_set_atlas_source->get_tile_at_coords(coords) == TileSetSource::INVALID_ATLAS_COORDS) {
					Rect2i rect = Rect2i((texture_region_size + separation) * coords + margins, texture_region_size + separation);
					rect = rect.intersection(Rect2i(Vector2(), texture->get_size()));
					if (rect.size.x > 0 && rect.size.y > 0) {
						base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5));
					}
				}
			}
		}
		
		Rect2i rect;
		
		rect.position = Vector2i();
		rect.set_end(Vector2i(texture->get_size().x, margins.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));