### Godot version

4.2

### System information

Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated AMD Radeon RX 6700 XT (Advanced Micro Devices, Inc.; 31.0.21001.45002) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

### Issue description

Tiles with light occluders still show shadows, when replacing them by code (set_cell) with a not occluding tile.
This does not happen when they are replaced with an empty cell (cell_id = -1) or erase_cell.

### Steps to reproduce

Make a new project with a Tilemap2D and a PointLight2D
Make 2 Tiles: One with an occluder and one without
Make the tiles placed by code.
Replace an occluding tile with a non occluding

### Minimal reproduction project

[TestForTilemap.zip](https://github.com/godotengine/godot/files/13539067/TestForTilemap.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()) {