Jenkins+Java 17+gradle 7.4.1: Unrecognized VM option 'CMSClassUnloadingEnabled'

Gradle fails when trying to start build in Jenkins project.
This only occurs in Jenkins, not in IntelliJ
Q: Where does gradle take its default parameters from and why doesnt it adapt to the selected JVM?

Process command line: /usr/lib/jvm/java-17-openjdk-amd64/bin/java -XX:+CMSClassUnloadingEnabled --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/ --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xms128m -Xmx1024m -Dfile.encoding=UTF-8 -Duser.language=en -Duser.variant -cp /var/lib/jenkins/.gradle/wrapper/dists/gradle-7.4.1-bin/58kw26xllvsiedyf3nujyarhn/gradle-7.4.1/lib/gradle-launcher-7.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.4.1
Please read the following process output to find out more:

Unrecognized VM option ‘CMSClassUnloadingEnabled’
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

-XX:+CMSClassUnloadingEnabled is not part of the default daemon arguments.
Do you maybe have this in in org.gradle.jvmargs for example?

There is nothing in git except the wrapper. In Jenkins, there is nothing configured except the gradle plugin installed. Config is for wrapper only without any further configs.

OK, got it. In /var/lib/jenkins/.gradle/ I found the GC flag.
But: This must have been a relic from an old Jenkins installation or old gradle runs with Java 11.
Definitely nothing I put there manually.