I don't remember where it is, but there is an option in the character settings where you can customize how targeting works. You can have 4 presets and either have keybind shortcuts or macros to toggle between them.