### Godot version

4.0.dev

### System information

win11，core i7 13700,  GTX4090

### Issue description

Just look at this gif.

![screenshots](https://user-images.githubusercontent.com/1620585/225354749-6ea17059-95b2-45e0-9765-8505e92726eb.gif)

It seems that it was block by Static Type Checking.

![image](https://user-images.githubusercontent.com/1620585/225362874-507ff0ec-c6d8-4a25-9a16-89db1885ad02.png)

If it's right.

Why it doesn't just disable other option except for String and StringName?

### Steps to reproduce

1. first select string type
2. input a text
3. change type
4. change back to string  -- it don't work
5. change to stringname -- it works
6. change back to string -- it works

### Minimal reproduction project

I think it don't need reproduction project.
scroll->set_focus_mode(FOCUS_CLICK);
	scroll->connect("gui_input", callable_mp(this, &AnimationTrackEditor::_scroll_input));
	scroll->connect("focus_exited", callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
	bezier_edit = memnew(AnimationBezierTrackEdit);
	timeline_vbox->add_child(bezier_edit);
	bezier_edit->set_editor(this);
	bezier_edit->set_timeline(timeline);
	bezier_edit->hide();
	bezier_edit->set_v_size_flags(SIZE_EXPAND_FILL);
	bezier_edit->connect("close_request", callable_mp(this, &AnimationTrackEditor::_cancel_bezier_edit));
	timeline_vbox->set_custom_minimum_size(Size2(0, 150) * EDSCALE);
	hscroll = memnew(HScrollBar);
	hscroll->share(timeline);
	hscroll->hide();
	hscroll->connect("value_changed", callable_mp(this, &AnimationTrackEditor::_update_scroll));
	timeline_vbox->add_child(hscroll);
	timeline->set_hscroll(hscroll);
	track_vbox = memnew(VBoxContainer);
	scroll->add_child(track_vbox);
	track_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
	scroll->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
	track_vbox->add_theme_constant_override("separation", 0);
	HBoxContainer *bottom_hb = memnew(HBoxContainer);
	add_child(bottom_hb);
	imported_anim_warning = memnew(Button);
	imported_anim_warning->hide();
	imported_anim_warning->set_text(TTR("Imported Scene"));
	imported_anim_warning->set_tooltip_text(TTR("Warning: Editing imported animation"));
	imported_anim_warning->connect("pressed", callable_mp(this, &AnimationTrackEditor::_show_imported_anim_warning));
	bottom_hb->add_child(imported_anim_warning);