Is it possible to replace Hibernate @ForeignKey annotations on a CLASS with a JPA-style ForeignKey annotation?

Wrt your remark: we are using something similar to Flyway for managing our database. Its liquibase (CSV for databases).

That’s good. Liquibase is also an automatic migration script tool too.

For our unit tests we use a H2 database for which a certain database schema is build on the fly for a certain test(s).

You should use the same DB schema as the one used in production. More, you need to test against the same DB engine you use in production. Use Docker and tmpfs too speed up tests so that they run almost as fast as H2.

For this I assume we use hbm2ddl to generate the DB schema - setup long long ago. At that moment the Hibernate annontations like ForeignKey are used.

You can use the hbm2ddl tool to generate the initial script or to periodically generate some scripts that you use to create the actual migration scripts.