This should not be allowed via XOG. The Clarity UI does not allow the creation of OBS units or Departments with same name with the same parent name.
As of Clarity 22.214.171.12425 XOG enforces the unique OBS name and Parent name constraint.
Working as expected.
Second scenario is also working as expected.