The thing with completely identical displays seems to be a known issue, and I am not aware of a solution. The symptoms you describe have been reported by others, that is why I asked in the first place.
(by comparison, I use two displays too, but not identical, and I never have had my mac lost track of where they are; even across different locations, like home and office, where I have other displays with different dispositions, it always gets them right)
By "Task Bar", do you mean the Dock?
Do you have positioned at the bottom of the screen?
If that is the case, then the behavior you experience, with the Dock "moving" from one screen to the other, is normal. You may want to try putting it on one side, instead of the bottom. FWIW, I don't really use the Dock for anything, so I have it on one side, and hidden. Even if you want it always visible, your screen real estate is far wider than it it tall, so on one side it can be out of your way.