As already mentioned, you will need to set 'postgresql.transactional.lock' flyway property to false.
From Spring Boot 3.2.0 on you can use flyway.postgresql.transactional-lock property.