In validateOffsetsAsync, we group the requests by leader node for efficiency. The list of topic-partitions are grouped from partitionsToValidate (all partitions) to node => fetchPostitions (partitions by node).
However, when actually sending the request with OffsetsForLeaderEpochClient, we use partitionsToValidate, which is the list of all topic-partitions passed into validateOffsetsAsync. This results in extra partitions being included in the request sent to brokers that are potentially not the leader for those partitions.
I have submitted a PR, https://github.com/apache/kafka/pull/8077, that fixes this issue.