Plugin compilation errors since intellij-platform-gradle-plugin version 2.4.0

Since intellij-platform-gradle-plugin version 2.4.0 our plugin fails to compile due to several unresolved packages/classes.

com.intellij.collaboration
com.intellij.dvcs
org.assertj

Though Gradle sync performed with no issues.

With plugin version 2.3.0 project compiled without errors. So we have to stay with this outdated version.
Strange point for me is that the issue depends on Gradle plugin version, not the IntelliJ platform version.

Thanks for any ideas how to resolve the issue.

Intellij IDEA 2025.1, 2025.2
Gradle 8.9
IntelliJ Platform Gradle Plugin 2.4.0