See this reference; I think it will fix your problem.
https://github.com/google/dagger/issues/4048#issuecomment-1864237679