How does torque control work in three phase motors?
Torque is given by the strength of the magnetic field, which is proportional to current, and the phase offset between the current position and the set position.

If the motor driver advances the phase of the three phase voltage (i.e. the set position), but the motor will not turn, torque will drop back to zero at the point where the electromagnetic field is exactly opposite the permanent magnets' field, then rise again in the opposite direction (because the shortest way from the current to the set position is now to go backwards), go to zero when the set position reaches the current position (phase angle is zero) and then rise again in forward direction.

For a motor that is held in place, torque will follow a sine wave pattern (more or less, the geometry of the fields is not exactly uniform).