### 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.
if (!group_sort.has(base_path)) {
				AnimationTrackEditGroup *g = memnew(AnimationTrackEditGroup);
				Ref<Texture2D> icon = get_theme_icon(SNAME("Node"), SNAME("EditorIcons"));
				String name = base_path;
				String tooltip;
				if (root && root->has_node(base_path)) {
					Node *n = root->get_node(base_path);
					if (n) {
						icon = EditorNode::get_singleton()->get_object_icon(n, "Node");
						name = n->get_name();
						tooltip = root->get_path_to(n);
					}
				}
				g->set_type_and_name(icon, name, animation->track_get_path(i));
				g->set_root(root);
				g->set_tooltip_text(tooltip);
				g->set_timeline(timeline);
				groups.push_back(g);
				VBoxContainer *vb = memnew(VBoxContainer);
				vb->add_theme_constant_override("separation", 0);
				vb->add_child(g);
				track_vbox->add_child(vb);
				group_sort[base_path] = vb;
			}
			track_edit->set_in_group(true);
			group_sort[base_path]->add_child(track_edit);
		} else {
			track_edit->set_in_group(false);
			track_vbox->add_child(track_edit);
		}