This is usually an issue with your git provider config for example if your commits are being registered under an account different from what the Vercel account is setup under no automated deploy will happen (there are some exceptions to this but this is a common cause of the issue if you have multiple git accounts on one device.
I have a few ideas, though I don’t know enough about your project and deployment workflow to be certain which is most likely in your case.
It could be that dist is not working for your serverless function because it’s seen as the output directory. You could get it working if you change the output directory in Build Settings if that’s the problem.
The typical directory for serverless functions is /api, which has the added benefit of automatic runtime detection (i.e. you wouldn’t need the builds section at all). You might get it working by putting the serverless function code in an /api directory at the root of the project. You can read more about that here: Using the Node.js Runtime with Serverless Functions
If Ignored Build Step is set for the project, that could be preventing Git deployments.
The other possibility is that the /dist/serverless.js path doesn’t exist on the git deployment due to some difference in deployment steps or possibly some git ignored files that are present in your local repo but missing from remote. A .env file is a common example, but it could be anything related to the build.
If you can share a minimal reproducible example and tell us the exact steps you use to deploy successfully with the CLI, that would give us more clues.