### Godot version

4.1-beta2

### System information

Godot v4.1.beta2.mono - Ubuntu 23.04 23.04 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (nvidia; 515.105.01) - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 Threads)

### Issue description

If multiple nodes are selected in the editor and drag them to the end of their parent in the scene tree, every node except the first one will be moved to the beginning of its parent.

Right click selected nodes and select move down will give expected result

https://github.com/godotengine/godot/assets/6362922/beab3a3d-0971-448f-9970-afe564d8b7f6



### Steps to reproduce

Create a parent node
Add few children nodes
Select some nodes and drag them to the end of the parent node


### Minimal reproduction project

[NodeArrangementReproduce.zip](https://github.com/godotengine/godot/files/11780108/NodeArrangementReproduce.zip)

if (MOVING_DOWN) {
				selection.reverse();
			}
			int lowest_id = common_parent->get_child_count() - 1;
			int highest_id = 0;
			for (Node *E : selection) {
				int index = E->get_index();
				if (index > highest_id) {
					highest_id = index;
				}
				if (index < lowest_id) {
					lowest_id = index;
				}
				if (E->get_parent() != common_parent) {
					common_parent = nullptr;
				}
			}
			if (!common_parent || (MOVING_DOWN && highest_id >= common_parent->get_child_count() - MOVING_DOWN) || (MOVING_UP && lowest_id == 0)) {
				break; 
			}
			EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
			if (selection.size() == 1) {
				undo_redo->create_action(TTR("Move Node In Parent"));
			}
			if (selection.size() > 1) {
				undo_redo->create_action(TTR("Move Nodes In Parent"));
			}
			for (int i = 0; i < selection.size(); i++) {
				Node *top_node = selection[i];
				Node *bottom_node = selection[selection.size() - 1 - i];