Mongodb sorting on nested field

Requirement: Sort the below collection with invoices/statuss.
Collection:

[
  {
    "test": 1,
    "invoices": [
      {
        "nu": 1,
        "statuss": "E0006"
      },
      {
        "nu": 1,
        "statuss": "A0001"
      }
    ]
  },
  {
    "test": 2,
    "invoices": [
      {
        "nu": 2,
        "statuss": "E0007"
      }
    ]
  },
  {
    "test": 3,
    "invoices": [
      {
        "nu": 2,
        "statuss": "Z0007"
      }
    ]
  },
  {
    "test": 3,
    "invoices": [
      {
        "nu": 123,
        "statuss": "A0007"
      },
      {
        "nu": 22,
        "statuss": "A0001"
      }
    ]
  },
  {
    "test": 3,
    "invoices": [
      {
        "nu": 2,
        "statuss": "B0007"
      }
    ]
  }
]

Query:

db.collection.aggregate([
  {
    $match: {
      "test": 3
    }
  },
  {
    $sort: {
      "invoices.statuss": 1
    }
  },
  {
    "$skip": 0
  },
  {
    "$limit": 10
  }
])

Output:

[
  {
    "_id": ObjectId("5a934e000102030405000003"),
    "invoices": [
      {
        "nu": 123,
        "statuss": "A0007"
      },
      {
        "nu": 22,
        "statuss": "A0001"
      }
    ],
    "test": 3
  },
  {
    "_id": ObjectId("5a934e000102030405000004"),
    "invoices": [
      {
        "nu": 2,
        "statuss": "B0007"
      }
    ],
    "test": 3
  },
  {
    "_id": ObjectId("5a934e000102030405000002"),
    "invoices": [
      {
        "nu": 2,
        "statuss": "Z0007"
      }
    ],
    "test": 3
  }
]

Question:
As per my understanding in “_id”: ObjectId(“5a934e000102030405000003”) the invoices collection should also be sorted, but in the result it’s not the same. What we are missing?

If you look at the $sort documentation you will see that this stage sorts top level documents.

What I understand is that you want the sort the array invoices within the top level documents. If this is the case you have to use $sortArray.