Created a package to download the source files directly from a vercel deployment, there were som existing ones but didn’t work well / lacking logs. Also published this to npm and setup npx command, so it can be directly ran via npx vercel-deploy-source-downloader <your-vercel-token>. For more details, please see the repo on github https://github.com/numanaral/vercel-deploy-source-downloader.
Created this as there was an accident that caused stashed changes to be lost due to .git folder removal, but thankfully had a temporary deployment which I was able to recover from, so thought I would share the script in case anyone else falls into a similar situation!