First of all, let me list some of the things I had tried before I started digging into the source code of the Postgres JDBC driver and Eclipselink.
-switching PGConnectionPoolDataSource.
-both container managed and bean managed transactions.
-REQUIRED and REQUIRES_NEW for container managed transactions.
None of this worked.
IIRC with Glassfish back in the day I used org.postgresql.Driver and let Glassfish's connection pooler wrap its own DataSource around it.
I ruled out the possibility of a bug in the Postgres JDBC driver and in EclipseLink. Only Payara remains. As said, for some reason, setAutoCommit is never called, which is the job of the transaction manager.