by definition connection poolers re-use connections so it it can happen with any connection pooling setup, PG or no.
in pgbouncer the connection is reset via a customisable command [0] which should reset the connection to a clean state.
[0] https://www.pgbouncer.org/config.html#server_reset_query