I honestly don’t know. I spend some time looking at the ACF code and I can’t find a reason that this would be happening.
I can tell you this, since you are using a priority of 10 for your filter and you are using
new_post as your post ID then the built in acf filter is running first, it has a priority of 2. The default post status set by acf should be draft.
Additionally, since the acf filter is running first the post ID will never be
new_post when your filter is run. The
wp_insert_post() portion of your code should never be run.
The only conclusion that I can come up with is that there is some other filter running after yours that is altering the post status again to publish.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!