Hello Emanuel,
I think the problem could be the following:
As the BAPI uses the function module CACL_CLASSIFICATION_SAVE, it will save the classification changes by default in an update task which starts "after the commit" and runs parallel some time with the following code.
Therefore it is possible, that the classification is still enqueued when you call the FM for your next package.
You could try to call the function module CLFM_SET_NO_UPD_TASK with I_NO_UPD_TASK=X before starting your changes, because then all changes will not be fulfilled in an update task.
Best wishes,
Daniel