Found out that the targeting bug often happens when the game freezes while your character is in the middle of a jump. For example if one split screen character jumps and at the same time the other split screen switches companions simultaneously making the game freeze four a few seconds, the character who jumped will get the targeting bug. I've tried this a few times and it's not 100% but is reproducable