I still don’t think I have a clear picture of when the field is created. The information you’ve given does not tell me if the code is run during the ajax request. Is it done in your functions.php file, or some other file that is loaded every time WP initializes?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users