I've somewhat resolved the issue by removing the PostgreSQL driver from DBeaver, and then installing an older one manually.
The DBeaver project was exported from an instance with 42.5.2 driver installed, and imported into DBeaver with driver v42.7.4. This may have caused the issue.
Now connections are working again, although the error still pops up once in a while, for a few seconds.