The tail motor speed of my traditional helicopter is not normal

I am facing some issues while assembling my own small helicopter. I am using an APM flight controller. When I unlock and throttle up, the main motor’s speed is normal, but the tail motor’s speed increases rapidly to maximum and stays at maximum, not responding to throttle changes unless the throttle is returned to zero. I have repeatedly calibrated the ESC. Currently, the PWM output for the tail motor is set to motor4, and the main motor is set to HELIRSC. The same issue arises when I set other PWM outputs to motor4. However, when I swap the signal wire of the tail motor with the main motor, the tail motor’s speed becomes normal.
I have checked the manual but couldn’t find a solution. Could everyone please help me? Thank you all.

A log would be very helpful in order to see your configuration and the output of the flight controller. Please post a log.

It sounds like normal heading lock tail windup when on the ground. Are you moving the heli after powering it on? Does the tail motor 4 respond to rudder input? On my helis even with out aurdu pilot in heading lock they will go to max tail deflection on the ground because they can not point the heli the direction they are trying to.