According to the doc from the official doc

The outputRoot directory is ~/.cache/bazel. (Unless $TEST_TMPDIR is set, as in a test of bazel itself, in which case this directory is used instead.)

However, if you are in a macOS, it is not true.

You should explicitly set your environment.

Bash
export TEST_TMPDIR=$HOME/.cache/bazel