Hello,
I've just found this on 1.16.0 / Windows:select an empty statement, e.g. /* */; and try to execute it.
this will pop up the message "Connection lost" although it is stillvalid (according to pg_stat_activity).
best regards,
Marc Mamin