I’ve opened an issue on GitHub 5, the maintainers were able to help me solve the problem.
Marking constant attributes with Final is the way to go, but it’s a feature that’s not yet available with the JIT compiler of the main releases (as of May 7, 2021).