### 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)

if (pending_action.history_id != INVALID_HISTORY) {
		
		p_history_id = pending_action.history_id;
	} else {
		pending_action.action_name = p_name;
		pending_action.timestamp = OS::get_singleton()->get_unix_time();
		pending_action.merge_mode = p_mode;
		pending_action.backward_undo_ops = p_backward_undo_ops;
	}
	if (p_history_id != INVALID_HISTORY) {
		pending_action.history_id = p_history_id;
		History &history = get_or_create_history(p_history_id);
		history.undo_redo->create_action(pending_action.action_name, pending_action.merge_mode, pending_action.backward_undo_ops);
	}
}
void EditorUndoRedoManager::create_action(const String &p_name, UndoRedo::MergeMode p_mode, Object *p_custom_context, bool p_backward_undo_ops) {
	create_action_for_history(p_name, INVALID_HISTORY, p_mode, p_backward_undo_ops);
	if (p_custom_context) {
		
		get_history_for_object(p_custom_context);
	}
}
void EditorUndoRedoManager::add_do_methodp(Object *p_object, const StringName &p_method, const Variant **p_args, int p_argcount) {
	UndoRedo *undo_redo = get_history_for_object(p_object).undo_redo;
	undo_redo->add_do_method(Callable(p_object, p_method).bindp(p_args, p_argcount));
}
void EditorUndoRedoManager::add_undo_methodp(Object *p_object, const StringName &p_method, const Variant **p_args, int p_argcount) {