When deploying, the .env file is written to the target server using this following method:
https://github.com/deploywithrocket/core/blob/9190d2baa4f0e95a5c2cd4048a2bcdb91f6fceb3/resources/shellscripts/deploy/dotenv.blade.sh#L1-L8
This methods seems to strip variables from the environment content itself. For example, here is a sample configuration Rocket side and the deployed version:

