In the last function there is a query that checks to see if there is an existing post with a value. You should be able to modify that query to include a tax_query. The problem here is that ACF will not pass the taxonomy/term value for the post during the validation AJAX request unless there is a taxonomy field that is part of the field group.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users