Nested sorting does not work with `_last` missing

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
v 2.17.0

Describe the issue:
This query works fine

{
  "size": 20,
  "query": {
    "match_all": {}
  },
  "sort": [
    {
      "prod.domains.score": {
        "order": "desc",
        "missing": "_first",
        "unmapped_type": "integer",
        "nested": {
          "path": "prod.domains",
          "filter": {
            "term": {
              "prod.domains.domain_key": "KEY"
            }
          }
        }
      }
    }
  ]
}

But this query DOESN’T works (I have just changed the missing type from _first to _last here)

{
  "size": 20,
  "query": {
    "match_all": {}
  },
  "sort": [
    {
      "prod.domains.score": {
        "order": "desc",
        "missing": "_last",
        "unmapped_type": "integer",
        "nested": {
          "path": "prod.domains",
          "filter": {
            "term": {
              "prod.domains.domain_key": "KEY"
            }
          }
        }
      }
    }
  ]
}

I’m getting this error

{
  "error": {
    "root_cause": [
      {
        "type": "unsupported_operation_exception",
        "reason": "unsupported_operation_exception: null"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "abc",
        "node": "Dqfbq8GN......",
        "reason": {
          "type": "unsupported_operation_exception",
          "reason": "unsupported_operation_exception: null"
        }
      }
    ]
  },
  "status": 500
}

Configuration:

Relevant Logs or Screenshots: