Moving headline in collapsed outline moves breaks hierarchy

Imagine Outline:
# 1.
Text
## 1.1.
# 2.
## 2.1.
# 3.
# 3.1.

Steps to reproduce:

  1. Click “Collapse all” button in the outline panel, so it shows only H1
  2. Move 3. between 1. & 2.

Expected result: The tree hierarch is not impacted, full deth of the branch is moved:

# 1.
Text
## 1.1.
# 3.
# 3.1.
# 2.
## 2.1.

Bug: It moves it inside the destination branch instead of to the end of it:

# 1.
# 3.
# 3.1.
Text
## 1.1.
# 2.
## 2.1.

Thanks for considering a fix.

I don’t think this is a bug, because you can also drop between the 1. and 2. number instead of inside 1.

Obsidian_OPSNoVvDLU