How to ensure pg_stat_activity shows all my queries?
pg_stat_activity is not an auditing facility.  It only shows one query per connected session.  Either the query which is currently executing, or if the connection is idle than the immediately prior query.

If you want to see historical queries, use a different tool. Maybe  pg_stat_statements, or log_statement=all.  Or any of a large number of third-party tools.