Found the Issue you were having. The Gearboxes ARE directional, so they decided to transfer their power the opposite way for the behind Gearboxes, while the front Gearboxes could transfer into both directions.
↓↓
←→→
↑↑
One half goes to the left, the other to the right, this is what happened to you.
And this one is what you intended with both going to the right
↓↓
→→→
↑↑
This is a very systematic Issue and a result of tick order, and all I can promise is, I wont ever do this garbage again outside of Minecraft…