Would you please be so kind and try to reproduce this in a sample application? Even if you can’t reproduce this consistently (class loading order being the culprit), having a sample for analysis would be a huge help. We have a test case template for bytecode enhancement tests here: hibernate-test-case-templates/orm/hibernate-orm-6/src/test/java/org/hibernate/bugs/QuarkusLikeORMUnitTestCase.java at main · hibernate/hibernate-test-case-templates · GitHub
We are currently trying to track down what is going on here exactly, but couldn’t reproduce it yet.