Deploying project as zip, generates empty folders

When you deploy a project as a zip file, you can end up with several empty folders. Not all, but some. It doesn’t matter if you deploy standard or advanced. The size of the project also does not seem to care. The problem is that when you deploy, everything looks good, but once deployed, you run into issues such as some applications not working (404)