Autocomplete results not in order and not accounting for hyphens

So i’m making a autocomplete search generator for the model name of a part in my mongodb database. The results print out but I need to figure out a way to autocomplete based on sorting the most accurate result at the top and accounting for hyphens within the part number (i.e SFP-10G-LR or XCVR-A10Y31, etc) as well as making the Prefix of the search term also being a prefix in the results. With Hyphens I’m thinking I need a wildcard but idk how to do that with autocomplete. If an employee of Mongo or any kind soul can help me then that’ll be very appriciated. Thank you. In the screenshot below you can see that the results aren’t matched with search prefix and if I added another hyphen (-) then all results would disappear I think one hyphen is accepted because maxEdits: 1. But someone please help me!

const { MongoClient } = require("mongodb");
const Express = require("express");
const Cors = require("cors");
const BodyParser = require("body-parser");
const { message } = require("statuses");

const client = new MongoClient("mongodb+srv://internus:Password@sandstonecluster.wbfmx.mongodb.net/Database?retryWrites=true&w=majority");

const server = Express();

server.use(BodyParser.json());
server.use(BodyParser.urlencoded({ extended: true }));
server.use(Cors());

var collection;

server.get("/search", async (request, response) => {
    try {
        let result = await collection.aggregate([
            {
                "$search": {
                    "autocomplete": {
                        "query": `${request.query.term}`,
                        "path": "Part Number",
                        "fuzzy": {
                            "prefixLength": 3,
                            "maxEdits": 1
                        },
                        "tokenOrder": "sequential",
                    }
                }
            },
            {
                "$sort": {
                    "score": { "$meta": "textScore" },
                    "posts": -1
                }
            },
            {
               "$limit": 10 
            },
        ]).toArray();
        response.send(result);
    }
    catch (e) {
        response.status(500).send({ message: message.e });
    }
});

server.listen(3000, async () => {
    try {
        await client.connect();
        collection = client.db("Database").collection("Parts");
    }
    catch (e) {
        console.error(e);
    }

});
//_____________________________HTML________________________________________
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
    <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
    <link rel="stylesheet" href="~/css/site.css" />
</head>
<body>
    <div class="ui-widget">
        <label for="part">Part:</label><br />
        <input id="part" />
    </div>
    <script>
            $(document).ready(function () {
                $("#part").autocomplete({
                    source: async function (request, response) {
                        let data = await fetch(`http://localhost:3000/search?term=${request.term}`)
                            .then(results => results.json())
                            .then(results => results.map(result => {
                                return { label: result["Part Number"], value: result["Part Number"], id: result._id };
                            }));
                        response(data);
                    },
                    minLength: 2,
                    select: function (event, ui) {
                        console.log(ui.item);
                    }
                });
            });
    </script>
</body>
</html>
<script src="~/js/site.js"></script>