Different sort despite same collation in Postgres
PostgreSQL uses the operating system for its locales (at least with libc as the collation provider, otherwise icu may be used), and unfortunately, different operating systems give inconsistent sort results for the same UTF-8 locale names.

The fact that UTF-8 collations with Postgres.app doesn't sort as expected is an old open item on their issue tracker: Problems with sort order (UTF8 locales don't work). It can't really be fixed unless Apple fixes macOS, and so far it's not happening. See Ordering differences between Postgres instances on different machines (same locale) for a 2012 question on SO mentioning the problem.


  What am I missing here, and how can I configuration postgres in my dev
  box to behave as expected?


Your options:


use the same operating system for dev and production, possibly virtualized.
use ICU collations. They sort the same across all operating systems, but as of PG version 12, they can be used only with explicit COLLATE clauses at the column or expression level (not at the database level).
use the "C" or "C.UTF-8" collations, which sort binary-wise by codepoints. They don't provide a linguistically-aware sort order, but they're faster, immutable and consistent across operating systems.