### Godot version

4.2 dev2

### System information

windows10

### Issue description

There is a bug in calling get_used_rect() after creating multiple layers in TileMap.

Draw area not covered (0, 0) coordinates, but using get_used_rect () to obtain data for [P: (0, 0), S: (3, 3)], expect is [P (1, 1), S: (2, 2)].

In minimal reproduction project, in the main scene, TileMap1 has only one layer and TileMap2 has two layers, They are in the same position and draw the same content, But calling get_used_rect() gets a different value.
![image](https://github.com/godotengine/godot/assets/63633253/5f9d5e69-c1d3-4d60-97d5-04e124caef8e)

Note: This bug still exists in dev4, but not in dev1.

### Steps to reproduce

In minimal reproduction project, running the main scene, you can see the data from TileMap1 and TileMap2 calling get_used_rect() in the console.

### Minimal reproduction project

[TestTileMap.zip](https://github.com/godotengine/godot/files/12549069/TestTileMap.zip)

const Ref<TileSet> &tile_set = tile_map_node->get_tileset();
	if (!tile_set.is_valid()) {
		return RBSet<TerrainConstraint>();
	}
	ERR_FAIL_INDEX_V(p_terrain_set, tile_set->get_terrain_sets_count(), RBSet<TerrainConstraint>());
	
	RBSet<TerrainConstraint> dummy_constraints;
	for (const Vector2i &E : p_painted) {
		for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { 
			TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
			if (tile_set->is_valid_terrain_peering_bit(p_terrain_set, bit)) {
				dummy_constraints.insert(TerrainConstraint(tile_map_node, E, bit, -1));
			}
		}
	}
	
	RBSet<TerrainConstraint> constraints;
	for (const TerrainConstraint &E_constraint : dummy_constraints) {
		HashMap<int, int> terrain_count;
		
		HashMap<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = E_constraint.get_overlapping_coords_and_peering_bits();
		for (const KeyValue<Vector2i, TileSet::CellNeighbor> &E_overlapping : overlapping_terrain_bits) {
			TileData *neighbor_tile_data = nullptr;
			TileMapCell neighbor_cell = get_cell(E_overlapping.key);
			if (neighbor_cell.source_id != TileSet::INVALID_SOURCE) {
				Ref<TileSetSource> source = tile_set->get_source(neighbor_cell.source_id);
				Ref<TileSetAtlasSource> atlas_source = source;
				if (atlas_source.is_valid()) {