SFTP Deploy permissions

I am using an ubuntu server 18.04.4 LTS for my development and production environment. When I deploy using a zip file the folders and files permissions are correct, when I use SFTP the folder permissions changes. The result is that I have to run a chmod command on the subfolders and files every time I deploy to be able to save my production settings in the production environment.
I would appreciate it if someone has a solution where I can deploy using SFTP without compromising my security and run a chmod command every time I use SFTP.
My guess is that it has to do with a SFTP setting or a SSH setting on my server? :upside_down_face: