Duplicated directories with (1), (2)... and so on at the end of folder name

I hope you can help me. I checked other posts but i didnt find any solution exact for me.

Could your please explain me how is it possible to get
folder/client/galleryD/files…
folder/client/galleryE/files…
folder(1)/client/galleryA/files…
folder(1)/client/galleryB/files…
folder(1)/client/galleryC/files…

How can I prevent that situation with (1), (2) etc?

The problem only occurs on the first part of the path. I tried to reproduce it while using API and creating the same name of “folder” but I couldnt get folder(1). I was just getting false result so it was ok. But still somehow it happens.

Is it any kind of network error? Configuration?

Please give me any tips how can I resolve it.

The server is standing on Centos machine. Clients are mostly web browsers on windows.