### 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.
return edit;
}
void AnimationTrackEditor::_notification(int p_what) {
	switch (p_what) {
		case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
			panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
		} break;
		case NOTIFICATION_ENTER_TREE: {
			panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
			[[fallthrough]];
		}
		case NOTIFICATION_THEME_CHANGED: {
			zoom_icon->set_texture(get_theme_icon(SNAME("Zoom"), SNAME("EditorIcons")));
			bezier_edit_icon->set_icon(get_theme_icon(SNAME("EditBezier"), SNAME("EditorIcons")));
			snap->set_icon(get_theme_icon(SNAME("Snap"), SNAME("EditorIcons")));
			view_group->set_icon(get_theme_icon(view_group->is_pressed() ? SNAME("AnimationTrackList") : SNAME("AnimationTrackGroup"), SNAME("EditorIcons")));
			selected_filter->set_icon(get_theme_icon(SNAME("AnimationFilter"), SNAME("EditorIcons")));
			imported_anim_warning->set_icon(get_theme_icon(SNAME("NodeWarning"), SNAME("EditorIcons")));
			main_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree")));
			edit->get_popup()->set_item_icon(edit->get_popup()->get_item_index(EDIT_APPLY_RESET), get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")));
		} break;
		case NOTIFICATION_READY: {
			EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", callable_mp(this, &AnimationTrackEditor::_selection_changed));
		} break;
		case NOTIFICATION_VISIBILITY_CHANGED: {
			update_keying();
		} break;
	}
}
void AnimationTrackEditor::_update_scroll(double) {