### 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.
hscroll = p_hscroll;
}
void AnimationTimelineEdit::_track_added(int p_track) {
	emit_signal(SNAME("track_added"), p_track);
}
void AnimationTimelineEdit::_bind_methods() {
	ADD_SIGNAL(MethodInfo("zoom_changed"));
	ADD_SIGNAL(MethodInfo("name_limit_changed"));
	ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag"), PropertyInfo(Variant::BOOL, "timeline_only")));
	ADD_SIGNAL(MethodInfo("track_added", PropertyInfo(Variant::INT, "track")));
	ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::FLOAT, "size")));
	ClassDB::bind_method(D_METHOD("update_values"), &AnimationTimelineEdit::update_values);
}
AnimationTimelineEdit::AnimationTimelineEdit() {
	name_limit = 150 * EDSCALE;
	play_position = memnew(Control);
	play_position->set_mouse_filter(MOUSE_FILTER_PASS);
	add_child(play_position);
	play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
	play_position->connect("draw", callable_mp(this, &AnimationTimelineEdit::_play_position_draw));
	add_track = memnew(MenuButton);
	add_track->set_position(Vector2(0, 0));
	add_child(add_track);
	add_track->set_text(TTR("Add Track"));
	len_hb = memnew(HBoxContainer);
	Control *expander = memnew(Control);
	expander->set_h_size_flags(SIZE_EXPAND_FILL);
	len_hb->add_child(expander);