Yes, you described the same problem. But how do you know that a1: 1 is not correct? It is just not solved by the sync command and I am not sure if there is an easy solution for that.
Perhaps you can solve it with a special sync command, where you create diffs of multiple versions before you sync in something, so basically a base line.
So your “base line” would be { A: a1, B: b1 }
Then Server X calculates the diff from { A: a2, B: b1 } => { A: a2 }
Then Server Y calculates the diff from { A: a1, B: b2 } => { B: b2 }
Then Server X applies the diff { A: a2 } + { A: a1, B: b1 } => { A: a2, B: b1 }
Then Server Y applies the diff { B: b2 } + { A: a2, B: b1 } => { A: a2, B: b2 }
But it depends on the order, and you can only do it on a per field level (no arrays).