### Godot version

4.1 Stable

### System information

MacBook Ventura 13.4

### Issue description

Undo/Redo manager `history_changed` events stop being emitted when clicking on the same editor inspector property. This also stops creating Undo/Redo events, so "undo" actions stop working.

### Steps to reproduce

The steps to reproduce is kind of finnicky, but I was able to reproduce it with relative easy using the "position" propert:

- Click "Y" position and change it to any value; press Enter.
- Click the "Y" position again and change it to any value; press Enter.
- Click the "Y" position again (again), and change it to any value; press Enter.

On the third time changing the value, "history_changed" events stop being emitted. Checking the "History" tab, you'll see only the two events are logged (other changes in the position are not).



### Minimal reproduction project

This can be reproduced in any project, but I'm attaching a project with an addon that logs a "history_changed" event on the console so you know when it stops being emitted.
[HistoryIssue.zip](https://github.com/godotengine/godot/files/12053128/HistoryIssue.zip)

for (const KeyValue<int, History> &E : history_map) {
		if ((E.key == GLOBAL_HISTORY || E.key == REMOTE_HISTORY || E.key == EditorNode::get_editor_data().get_current_edited_scene_history_id()) && !E.value.redo_stack.is_empty()) {
			return true;
		}
	}
	return false;
}
void EditorUndoRedoManager::clear_history(bool p_increase_version, int p_idx) {
	if (p_idx != INVALID_HISTORY) {
		History &history = get_or_create_history(p_idx);
		history.undo_redo->clear_history(p_increase_version);
		history.undo_stack.clear();
		history.redo_stack.clear();
		if (!p_increase_version) {
			set_history_as_saved(p_idx);
		}
		emit_signal(SNAME("history_changed"));
		return;
	}
	for (const KeyValue<int, History> &E : history_map) {
		E.value.undo_redo->clear_history(p_increase_version);
		set_history_as_saved(E.key);
	}
	emit_signal(SNAME("history_changed"));
}
String EditorUndoRedoManager::get_current_action_name() {