### Godot version

4.1

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description


https://github.com/godotengine/godot/assets/2223172/852654b0-dadd-411e-8fe5-f9c00492a497



### Steps to reproduce

1. Add a Node to the scene
2. Right click it and mark it as unique name
3. Start renaming the node
4. Press Enter

### Minimal reproduction project

N/A
}
		if (num_groups >= 1) {
			msg_temp += TTRN("Node is in this group:", "Node is in the following groups:", num_groups) + "\n";
			List<GroupInfo> groups;
			p_node->get_groups(&groups);
			for (const GroupInfo &E : groups) {
				if (E.persistent) {
					msg_temp += String::utf8("•  ") + String(E.name) + "\n";
				}
			}
		}
		if (num_connections >= 1 || num_groups >= 1) {
			if (num_groups < 1) {
				msg_temp += "\n";
			}
			msg_temp += TTR("Click to show signals dock.");
		}
		Ref<Texture2D> icon_temp;
		SceneTreeEditorButton signal_temp = BUTTON_SIGNALS;
		if (num_connections >= 1 && num_groups >= 1) {
			icon_temp = get_theme_icon(SNAME("SignalsAndGroups"), SNAME("EditorIcons"));
		} else if (num_connections >= 1) {
			icon_temp = get_theme_icon(SNAME("Signals"), SNAME("EditorIcons"));
		} else if (num_groups >= 1) {
			icon_temp = get_theme_icon(SNAME("Groups"), SNAME("EditorIcons"));
			signal_temp = BUTTON_GROUPS;
		}
		if (num_connections >= 1 || num_groups >= 1) {
			item->add_button(0, icon_temp, signal_temp, false, msg_temp);
		}