JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css">
<div>
Type a <backspace> a <backspace> ... to see the counter below increase.
<br />
<input type="text" id="ac" />
</div>
<div>
<br />
<br />
Number of elements in $('#ac').autocomplete('instance').menu.bindings: <span id="out"></span>
<br />
<br />
Then uncomment the fix, rerun, and repeat.
</div>
JavaScript
/*
let old = $.ui.menu.prototype._untrackClassesElement;
$.ui.menu.prototype._untrackClassesElement = function (event) {
let ret = old.apply(this, arguments);
this._off($(event.target), 'remove');
return ret;
};
*/
$('#ac').autocomplete({source:['a', 'aa', 'b', 'bb', 'c', 'cc']});
setInterval(() => {
console.log($('#out').text($('#ac').autocomplete('instance').menu.bindings.length));
}, 100);