PostgreSQL (12-16) may ignore your fresh built index due to long-running transaction in another session. It's since 2007, introduced by HOT optimization. Look at pg_index.indcheckxmin of your index.
First session:
postgres=# begin;
BEGIN
postgres=*# select txid_current();
txid_current
--------------
10008974883