FWIW, even though it feels like “repeating yourself” Postgres will only calculate that fragment value once even if it’s used in both SELECT and GROUP BY - it’ll even fail if the expression isn’t identical.
For instance, see this discussion where the same column was interpolated as two separate placeholders and angered the query planner: