Without the full details from the template, we’re left to guess.
My best guess is that you’re running Caddy in a Docker container without persistent storage. So each time you redeploy, the previous container is wiped, and the new instance has to request a fresh certificate because the old one is gone.
That said, I’ll echo what @Mohammed90 mentioned - please don’t skip the template. It really helps us help you.
The data directory must not be treated as a cache. Its contents are not ephemeral or merely for the sake of performance. Caddy stores TLS certificates, private keys, OCSP staples, and other necessary information to the data directory. It should not be purged without an understanding of the implications.