wp_set_object_terms creates taxonomies but does not add custom posts to it

wp_insert_post_data is applied before the post data are inserted to the database. use the save_post hook instead to set the custom taxonomy terms.
That was it. Thanks Sally for the recommendation.