i just stumbled upon something (maybe) interesting in the gradle upgrade notes to 7.5 :
In previous Gradle versions,
mustRunAfter constraints between regular tasks and finalizer task dependencies would not be honored.
… i wonder if it might also impact the configuration of sonar-scanner-gradle
In addition … this maybe might have impact on these topics also? (does not have to, i just recalled multiple threads about it, researched the links and thought i put them here, too)
Finally leaving some keywords for search: gradle tasks task dependsOn finalizedBy