### Godot version

v4.0.rc2.official [d2699dc7a]

### System information

Linux Ubuntu 20.04 with Unity desktop

### Issue description

There is not tool to edit tile collision shape numerically in Godot, so I often finish precise editing with an external editor.

Changing tile data forces a refresh, which is very visible when TileSet is open.

At this point, I'm spammed with missing tile errors:

![image](https://user-images.githubusercontent.com/1067772/219756420-51aecff7-8830-4024-9be7-5b9ffe69fd18.png)

After this, entering Select mode and clicking on a tile again will crash with the callstack:

> PlaceHolderScriptInstance::get_property_list(List<PropertyInfo, DefaultAllocator>*) const (core/object/script_language.cpp:516)
> TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(TileSetAtlasSource*, RBSet<TileSetAtlasSourceEditor::TileSelection, Comparator<TileSetAtlasSourceEditor::TileSelection>, DefaultAllocator>) (editor/plugins/tiles/tile_set_atlas_source_editor.cpp:508)
> TileSetAtlasSourceEditor::_update_tile_inspector() (editor/plugins/tiles/tile_set_atlas_source_editor.cpp:594)
> TileSetAtlasSourceEditor::_end_dragging() (editor/plugins/tiles/tile_set_atlas_source_editor.cpp:1456)
> TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(Ref<InputEvent> const&) (editor/plugins/tiles/tile_set_atlas_source_editor.cpp:1283)
> void call_with_variant_args_helper<TileSetAtlasSourceEditor, Ref<InputEvent> const&, 0ul>(TileSetAtlasSourceEditor*, void (TileSetAtlasSourceEditor::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (core/variant/binder_common.h:293)
> void call_with_variant_args<TileSetAtlasSourceEditor, Ref<InputEvent> const&>(TileSetAtlasSourceEditor*, void (TileSetAtlasSourceEditor::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (core/variant/binder_common.h:407)
> CallableCustomMethodPointer<TileSetAtlasSourceEditor, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (core/object/callable_method_pointer.h:104)
> Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (core/variant/callable.cpp:50)
> Object::emit_signalp(StringName const&, Variant const**, int) (core/object/object.cpp:1046)
> Error Object::emit_signal<Ref<InputEvent>>(StringName const&, Ref<InputEvent>) (core/object/object.h:869)
> Control::_call_gui_input(Ref<InputEvent> const&) (scene/gui/control.cpp:1738)
> Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (scene/main/viewport.cpp:1389)
> Viewport::_gui_input_event(Ref<InputEvent>) (scene/main/viewport.cpp:1659)
> Viewport::push_input(Ref<InputEvent> const&, bool) (scene/main/viewport.cpp:2834)
> Window::_window_input(Ref<InputEvent> const&) (scene/main/window.cpp:1368)
> void call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (core/variant/binder_common.h:293)
> void call_with_variant_args<Window, Ref<InputEvent> const&>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (core/variant/binder_common.h:407)
> CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (core/object/callable_method_pointer.h:104)
> Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (core/variant/callable.cpp:50)

I debugged but do not see how we jumped from AtlasTileProxyObject::edit with this line:

    	if (tile_set_atlas_source && tile_set_atlas_source->has_tile(coords) && tile_set_atlas_source->has_alternative_tile(coords, alternative)) {

to PlaceHolderScriptInstance::get_property_list with this line:

    	if (script->is_placeholder_fallback_enabled()) {

which crashes on null ref script dereferencing.

However, debugging `coords` shows that it's equal to {2, 3} which corresponds to the missing tile. So somewhat, during reload we lost tile reference and don't retrieve it later, causing the crash on next access.

If you avoid refreshing while TileSet is open, you can avoid the crash.

EDIT: if you have opened the TileSet once, even if you close it, you can still get crash as early as the refresh, without even selecting a tile...

If you close and reopen the TileSet window completely after refresh, it seems you can avoid the crash too, but you'll still get missing tile errors after refresh (and ideally we'd do a clean reload).

### Steps to reproduce

1. Open TileSet, Select tab. I also tend to select a tile and start editing the red collision shape, but it seems optional
2. Edit tile collision shape coordinates in external editor. Editing them in Godot first allows you to see diff in VCS and therefore find where it's located in text file more easily. However, I think that changing any tile data value will force reload too anyway.
3. Refocus on Godot and observe auto-refresh
4. Try to select a tile again, and crash

### Minimal reproduction project

I found Demo 2D Platformer to be a good test for a complex tileset, but for this bug, any dummy tileset is fine, you can create one in a new project.
new_rect.size.y = old_rect.get_end().y - new_rect.position.y;
				}
				if (drag_type == DRAG_TYPE_RESIZE_RIGHT || drag_type == DRAG_TYPE_RESIZE_TOP_RIGHT || drag_type == DRAG_TYPE_RESIZE_BOTTOM_RIGHT) {
					new_rect.set_end(Vector2i(MAX(new_base_tiles_coords.x, old_rect.position.x + 1), new_rect.get_end().y));
				}
				if (drag_type == DRAG_TYPE_RESIZE_BOTTOM || drag_type == DRAG_TYPE_RESIZE_BOTTOM_LEFT || drag_type == DRAG_TYPE_RESIZE_BOTTOM_RIGHT) {
					new_rect.set_end(Vector2i(new_rect.get_end().x, MAX(new_base_tiles_coords.y, old_rect.position.y + 1)));
				}
				if (tile_set_atlas_source->has_room_for_tile(new_rect.position, new_rect.size, tile_set_atlas_source->get_tile_animation_columns(drag_current_tile), tile_set_atlas_source->get_tile_animation_separation(drag_current_tile), tile_set_atlas_source->get_tile_animation_frames_count(drag_current_tile), drag_current_tile)) {
					tile_set_atlas_source->move_tile_in_atlas(drag_current_tile, new_rect.position, new_rect.size);
					selection.clear();
					selection.insert({ new_rect.position, 0 });
					drag_current_tile = new_rect.position;
					
					tile_set_changed_needs_update = false;
					_update_tile_inspector();
					_update_atlas_view();
					_update_tile_id_label();
					_update_current_tile_data_editor();
				}
			}
			
			tile_atlas_control->queue_redraw();
			tile_atlas_control_unscaled->queue_redraw();
			alternative_tiles_control->queue_redraw();
			alternative_tiles_control_unscaled->queue_redraw();
			tile_atlas_view->queue_redraw();
			return;
		}
		Ref<InputEventMouseButton> mb = p_event;