This would only work for an ACF taxonomy field and not for the standard WP category meta box.
I don’t know if you can limit the categories in the WP meta box, after a quick search I found nothing on the subject. The only thing I can find information on is how to hide it.