What is the value of $select_categories_to_show_term->name?
This needs to be an array of term names. I don’t think it is because ACF does not have an option to return term names. You will need to loop over the array of terms that ACF returns and extract the names if you are returning term objects. If you are returning the term ID then it will get a little more complicated. On the other hand, if you are returning an array of term IDs then what you need to do is query by the term ID instead of the name.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users