When I was playing around with the comparator, I tried to give the input directly with redstone and directly with repeaters.
When the Comparator is toggled and the signal strength is the same at input B and A, the following happens:
If you give the input over redstone, the output is as expected: As the inputs are equally strong, the output equals input A.
[media]But if you give the inputs over repeaters, it's like B would be stronger than A, because the output is 0.
[media]So my assumption would be that, when there's is a repeater directly at input B, B is always considered stronger than A.
Works as intended.
Toggled comparators have the output (A - B), but only when B is inputted with a comparator (or in your case repeater).