I reported the problem at https://youtrack.jetbrains.com/issue/IJPL-247655/Inspection-Inappropriate-Frontend-Backend-API-usage-in-module-shows-incorrect-warnings
The problem is that a “frontend” module of my V2/split-mode Gradle setup is detected as a “shared” module and the inspection displays warnings.
I’m almost sure that it’s a bug, but I’m posting it here if it’s not a bug and more likely a problem with the Gradle plugin and/or my Gradle setup.