pulumi refresh queries every resource in the stack and updates state to match reality. It is the tool for reconciling drift, and it is destructive to state in a specific way: a resource deleted outside Pulumi is removed from state, so the next pulumi up recreates it rather than reporting a discrepancy.
That is usually correct, but it means a refresh run reflexively before every deployment converts an accidental console deletion into an automatic recreation with a new physical name, which may not be equivalent.
Run refresh as a deliberate, reviewed step. pulumi refresh --preview-only, or pulumi preview --refresh for the combined view, shows what would change without writing. Adding --expect-no-changes makes a refresh fail if any drift is found, which is a useful CI gate for detecting manual changes. Since Pulumi 3.x the --refresh flag on up performs the refresh as part of the same operation, and the refresh option can also be set per stack in configuration so it is not forgotten.