The problem is that we do not take fk dependencies into account in the data import order, but instead rely on the fact that the generated chagnelog inserts the database before creating the foreign keys. In your case, you are working around that assumption…
The normal usage of liquibase is not to create tables and insert data into the, then use generateChagneLog, but rather put the data into a changelog based on your understanding of how the data works, then run liqubase update to get data into the database. Since that is the primary use case, the generateChangeLog functionality doesn’t handle all cases.
Depending on how you are wanting to use liquibase, you may need to manually move the order of the the data load changesets, or add foreign key enable/disable changeSets.