Object orbit movement

I have the following senario:

I’ve created a Drone model which starts in a circular motion around another object, and when any other object with an “Enemy” tag enters its collider, it leaves orbit and returns when that enemy no longer exists

What I am trying to achieve is something similar to what I have in the attached image, the drone is moving along the circular path, it finds an enemy within range and leaves orbit to intercept at P2, it then returns back and follows the circular path in a smooth manner. My main issue is returning into orbit which I have no idea how to do. I’ve tried several things with no luck, this is the code I am currently using to return the drone into orbit:

	function idle(){
		var base = GameObject.FindGameObjectWithTag("Base");
		if(Vector3.Distance(base.transform.position,drone.position)>droneHoveringDistance+settingDroneDirectionDistance){
		    var targetPosition = base.transform.position;
		    targetPosition.y = hoveringHeight;
			var rotation = Quaternion.LookRotation(targetPosition-drone.position);
		    drone.rotation = Quaternion.Lerp(drone.rotation, rotation, Time.deltaTime );
		    drone.Translate(Vector3.forward * Time.deltaTime * speed);
		}
		else if(Vector3.Distance(base.transform.position,drone.position)>droneHoveringDistance){
			var basePosition = base.transform.position;
			basePosition.y = hoveringHeight;
			basePosition+=drone.left*droneHoveringDistance;
			rotation = Quaternion.LookRotation(basePosition-drone.position);
		    drone.rotation = Quaternion.Lerp(drone.rotation, rotation, Time.deltaTime );
			drone.Translate(Vector3.forward * Time.deltaTime * speed);
			//drone.RotateAround(base.transform.position,Vector3.up,speed*Time.deltaTime);
			previousPosition = drone.transform.position;
		}
		else{
			drone.RotateAround(base.transform.position,Vector3.up,speed*Time.deltaTime);
		}
	}

Basically, the first if returns the drone near the base, the second if tries to modify the drone’s direction to merge smoothly into orbit, the else rotates the drone around the base…

After trying a bit more, this worked for me, if anyone has a better approach please recommend:

	function idle(){
		var base = GameObject.FindGameObjectWithTag("Base");
		var targetPosition = base.transform.position;
		targetPosition.y = hoveringHeight;
		if(Vector3.Distance(base.transform.position,drone.position)>hoveringDistance+settingDroneDirectionDistance){
		    targetPosition+=drone.right*-1*hoveringDistance;
			var rotation = Quaternion.LookRotation(targetPosition-drone.position);
		    drone.rotation = Quaternion.Lerp(drone.rotation, rotation, Time.deltaTime );
		    drone.Translate(Vector3.forward * Time.deltaTime * speed);
		}
		
		else{
			//drone.RotateAround(base.transform.position,Vector3.up,speed*Time.deltaTime);
			var nextPosition = drone.position+(drone.forward*speed*Time.deltaTime);
			var distanceFromBase = Vector3.Distance(nextPosition,targetPosition);
			var direction = (nextPosition-targetPosition).normalized;
			nextPosition = nextPosition-((distanceFromBase-hoveringDistance)*direction);
			rotation = Quaternion.LookRotation(nextPosition-drone.position);
		    drone.rotation = Quaternion.Lerp(drone.rotation, rotation, Time.deltaTime );
			drone.Translate(Vector3.forward * Time.deltaTime * speed);
		}
	}