Thanks for reporting the issue, I can see that it happens when the transfer amount exceeds the remaining value in the first stack.
For example chest A is transfering to B, there is 9954 in B and the pipe is transfering 100 ever cycle. So in this instance the 100 will get transfered over completing the stack but the excess 54 so starts a new stack instead of just transfering 46 and stopping.
if however the value to reach a full stack matches the pipe transfer rate then it completes the stack and stops transfering. 9900 in B, pipes transfer 100 and completes the stack at 10000 and stops.