I'm sorry, but I couldn't find any specific information on preventing Prefect from deleting the auto-generated Dockerfile after building a deployment. The Prefect documentation does discuss creating deployments with YAML and using the Prefect CLI to build custom images with dependencies specified in a requirements.txt file. However, it doesn't mention the auto-deletion of Dockerfiles.
You might want to consider reaching out to the Prefect community or support for more specific guidance on this issue.