The contents of generated/ and pub/static/ are automatically cleared each time you run:
This is intentional since an upgrade implies there is new code and/or theme changes to process. Also new modules are automatically enabled when upgrading. If you know there are no code changes then you can avoid the reflection error with this ...
This entire answer is based on the assumption that you didn't perform any specific cache configuration in app/etc/env.php
If this is not the case for you, the answer might be irrelevant.
What is happening in Varnish
Varnish is returning an HTTP/503, not because it could not connect to the origin server, but because the health check fails. The ...