We have a large Gradle project. IntelliJ just stops keeping track of types and plugins after a certain threshold it seems... our build files are almost all lacking any sort of IDE help... even stuff like String stopped working on some projects, like IntelliJ can't even see it's a Groovy file anymore.
Using kts could help but when we built most of it, that didn't exist and when we finally tried, it was so slow and buggy we couldn't use it until maybe a year ago (and we're not going to rewrite thousands of lines of Gradle across multiple projects)... and anyway, Groovy has as much metadata for types as Kotlin as nearly all plugins and Gradle itself use typed Groovy, so this really should work as good in Groovy as in Kotlin. IntelliJ seems to be completely stopping improving the Groovy DSL support, meaning our build will probably become unmaintainable... having had to migrate from Gradle 3 all the way to Gradle 7 over the years, with the many, many breaking changes they've subjected us to over that period, I'd rather rewrite everything in another build system than try to use kts and Gradle 8, which broke even more stuff than previous upgrades.
The best thing to do here is to check the IntelliJ bug tracker (https://youtrack.jetbrains.com/issues/IDEA) to see if your issue is there, and if not create a ticket for it. That way, it is more likely to be fixed.