### Godot version

v4.2.dev2.mono.official 

### System information

Godot v4.2.dev2.mono - Windows 10.0.22621 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3179) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 Threads)

### Issue description

When making a change on a TileSet, the TileSet tab will close, so you have to reopen it to continue doing what you want to do.

https://github.com/godotengine/godot/assets/88297220/b9f727d8-3ced-404a-9eb0-06f22c66bb99



### Steps to reproduce

1. Add a TileMap
2. Assign a TileSet to the TileMap
3. Add a new layer or make a change to the TileSet.

### Minimal reproduction project

N/A
source_sort = p_option;
}
List<int> TilesEditorUtils::get_sorted_sources(const Ref<TileSet> p_tile_set) const {
	SourceNameComparator::tile_set = p_tile_set;
	List<int> source_ids;
	for (int i = 0; i < p_tile_set->get_source_count(); i++) {
		source_ids.push_back(p_tile_set->get_source_id(i));
	}
	switch (source_sort) {
		case SOURCE_SORT_ID_REVERSE:
			
			source_ids.reverse();
			break;
		case SOURCE_SORT_NAME:
			source_ids.sort_custom<SourceNameComparator>();
			break;
		case SOURCE_SORT_NAME_REVERSE:
			source_ids.sort_custom<SourceNameComparator>();
			source_ids.reverse();
			break;
		default: 
			break;
	}
	SourceNameComparator::tile_set.unref();
	return source_ids;
}
Ref<TileSet> TilesEditorUtils::SourceNameComparator::tile_set;
bool TilesEditorUtils::SourceNameComparator::operator()(const int &p_a, const int &p_b) const {