I was looking for a solution dealing with DSL and kotlin convention plugins, in that case you can add this on your class:
Project.extensions.configure<KspExtension> { arg("dagger.hilt.disableModulesHaveInstallInCheck", "true") }