How do i align the movement of my player with a camera with "Aim Assist",How do i align the movement with the camera movement?

I have implemented a system in my first person game, that if i am close to an enemy it makes me automatically aim at it.

And the problem is, that i don’t know how to align the movemet, now if the player comes into that radius he is still moving into that direction, the camera was looking before.
But i want that if i am in that locked camera mode, that when i walk forward i am walking into the direction of the enemy, and side ways i want to walk around the enemy in a circle. but i dont know how to implement it.

My current movement code:

       if (distance >= lookRadius)
         {

        float x = Input.GetAxis("Horizontal");
        float z = Input.GetAxis("Vertical");

        Vector3 move = transform.right * x + transform.forward * z;

        controller.Move(move * speed * Time.deltaTime);
    }
    else
    {
        float x = Input.GetAxis("Horizontal");
        float z = Input.GetAxis("Vertical");

        Vector3 move = transform.right * x + transform.forward * z;

        controller.Move(move * speed * Time.deltaTime);
    }

What I got from this is that right now if the player is moving in one direction and then the aim assist kicks in he will continue to move in that direction rather than where the camera is facing, yes? You should be able to solve this problem by making sure the camera and the player always have the same Y rotation. I would suggest rotating the player (not the camera itself) and having the camera as a child object so that when you are moving your player it will always move relative to the camera.