**Link to relevant issue and/or commit:** https://github.com/bazelbuild/bazel/pull/22246#issuecomment-2268801677 **Other details:** java_tools v13.7.0 rules_java 7.9.0 cc @bazelbuild/triage