### Godot version

4.0 9f68d06

### System information

Windows 10 x64

### Issue description

When changing any property of tile source, e.g. name:
![image](https://user-images.githubusercontent.com/2223172/219977766-9babbd6c-cd75-41a0-a167-fe6da039d05e.png)
This error appears in the output:
```
UndoRedo history mismatch: expected 0, got 2.
Set name
```
It means that there is an undo action that starts with a global object and continues with a scene one.

Only happens when the TileSet is built-in and it makes the changes to the tileset being registered as global, i.e. not related to its scene (which results in history inconsistency after closing the scene).

I did some debugging and the action comes from inspector, which edits TileSetAtlasSourceEditor and then TileSetAtlasSource. I don't know what exactly triggers it; the properties should be only set on TileSetAtlasSource.

### Steps to reproduce

1. Add scene
2. Add tilemap
3. Add tileset (don't save it to a file)
4. Edit tileset
5. Add atlas source (e.g. drop icon.svg)
6. Change atlas name
7. Observe output

### Minimal reproduction project

N/A
if (p_editor->has_main_screen()) {
		Button *tb = memnew(Button);
		tb->set_flat(true);
		tb->set_toggle_mode(true);
		tb->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(singleton->main_editor_buttons.size()));
		tb->set_name(p_editor->get_name());
		tb->set_text(p_editor->get_name());
		Ref<Texture2D> icon = p_editor->get_icon();
		if (icon.is_valid()) {
			tb->set_icon(icon);
			
			icon->connect_changed(callable_mp((Control *)tb, &Control::update_minimum_size));
		} else if (singleton->gui_base->has_theme_icon(p_editor->get_name(), SNAME("EditorIcons"))) {
			tb->set_icon(singleton->gui_base->get_theme_icon(p_editor->get_name(), SNAME("EditorIcons")));
		}
		tb->add_theme_font_override("font", singleton->gui_base->get_theme_font(SNAME("main_button_font"), SNAME("EditorFonts")));
		tb->add_theme_font_size_override("font_size", singleton->gui_base->get_theme_font_size(SNAME("main_button_font_size"), SNAME("EditorFonts")));
		singleton->main_editor_buttons.push_back(tb);
		singleton->main_editor_button_hb->add_child(tb);
		singleton->editor_table.push_back(p_editor);
		singleton->distraction_free->move_to_front();
	}
	singleton->editor_data.add_editor_plugin(p_editor);
	singleton->add_child(p_editor);
	if (p_config_changed) {
		p_editor->enable_plugin();
	}
}
void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) {