Turn off the option under character config to "deselect current target when clicking on empty space" - There is your problem. Dunno why you even turned that on in the first place when the ESC key serves just fine to un-target things.