Production public path

Hello!
I have seen some similar topics here however haven’t found exact answer or understand why is it like it is.

In config.json there is public path. I have renamed my theme lets call it CustomName

“publicPath”: “/wp-content/themes/CustomName”,

Yarn start works great all images are loading. Yarn build works too.

When I do build for production or just upload files to ftp inside sub folder domaine.comclient/clientname my images won’t be loaded. Some svg icons are shown however it seems they are added as data. Problem is that when inspecting element I see that images are requested from url domaine.com/wp-content/themes/CustomName… etc.

I can fix it when I set new publicPath as following.
“publicPath”: “/clients/clientname/wp-content/themes/CustomName”,

However this seems wrong to me. I want to build a theme in a way that it can be uploaded to whatever folder and it works. Any ideas what I am doing wrong here?