Found the reason finally
The reason for the failure is actually the “asm” dependency version I have at “buildSrc”. The version 9.4 there is not compatible with Java 21. After upgrading to version 9.7, all works.
I find it strange that it uses that one over the 9.7 already in the project. I thought those dependencies would be there only the build of the plugins.