Is Rest API update method for article is not thread save ?


I have problem with shopware 5 rest api update method. When I use rest api and i try to update product i got integrity constraint violation error but error only occurs only when i do update in parallel manner. 

Integrity constraint violation: 1062 Duplicate entry ‘20874-1349’ for key 'articleID

When I do update in normal way , in one thread error not occurs. Do you have idea what can cause the error? 
Here are similar link issues:

It looks like the problem is not with duplicated data. It could be because of the access the same resource inside flush method in the same time. I am not sure how i can fix that ?