The sensitive = true flag on a variable or output only suppresses the value in CLI output and plan diffs. It has no effect on what is written to state. Generated passwords, private keys returned by a provider, and any secret passed into a resource are stored in the state file as readable JSON.
This makes the state file itself a secret. A state file in a Git repository, in a world-readable S3 bucket, or attached to a CI artifact is a credential leak. terraform show -json and terraform state pull both emit the plaintext values, so any CI job with backend credentials can read them.
The mitigations are to encrypt the backend at rest and restrict read access, to treat backend credentials as production secrets, and to avoid generating secrets in Terraform where a secrets manager can generate and store them instead. Terraform 1.10 introduced ephemeral resources and write-only arguments for exactly this problem: values that flow through a plan and apply without ever being persisted to state. Existing state files are not retroactively cleaned by adopting them.