First up up need to know why your gear shaft moved sideways for it to disengage from the toothed segment on the selector drum. Normally the end of the selector shaft butts up against a cast in stop in the clutch cover, if this is not happening you have the wrong selector shaft.
Secondly, the selector shaft has a double-acting return spring located behind the toothed segment of the selector shaft, this spring has two legs, each leg must go either side of the pin (approx 8mm dia) that's screwed onto the r/h case. You need to ensure you spread the spring legs apart as you push the selector shaft back in to it's home position or the shaft will not return to the central position when pushed down or pulled up.