Path indexing was disabled and go modules integration was enabled, but still I kept having the issue even after cleaning the cache. Adding this GOFLAGS=-e in the Go module settings has solved it for me:
GOFLAGS=-e