Character Lock on to Target Problems!

I’ve been trying to get it so that my character locks on to the enemy and keeps facing the enemy while locked on. I’m looking for a sort of Legend of Zelda approach to the game, but every time I lock on, the character can rotate freely even when locked on. Please could someone help me?