I'm not sure if this can be done on all platforms, but it sure is possible in PC. When playing with a controller, the game has a lock-on function that can be used on any entity with health points. Just hold the Examine button on the target for around two seconds and the game will keep the selection on the target until it is unlocked with the Secondary action button or the entity ceases to exist. It's the equivalent of an aimbot for mouse users.