The LISTEN and NOTIFY don’t shouldn’t be on the same connection. In fact, many libraries require a separate dedicated connection to LISTEN on.
One feature of PubSub that is also a caveat is that it is transactional. That is great for production code, but makes transactional tests impossible.