You will only need to lock on to get the firing solution. After the torpedo is launched you can do whatever you want

As long as you do not show yourself to your target so that it might get ideas of evasive maneuvers it shouldn't matter what you do next.