The axle is misaligned by half a stud, so an obvious approach to this problem is offset your motor by half a stud.
The technique of offsetting bricks by half a stud is known as AZMEP (from the german "aus zwei mach eins Plättchen", meaning offset of half a stud), which is a specific case of the SNIR (Studs Not In a Row) technique.
As it has been ...
An alternative is to shift the linear actuator by half a stud using eg. a Technic Bush 1/2 Smooth or Technic, Liftarm Thin 1 x 2 - Axle Holes (or any other thin liftarm) as spacer on both sides to control the horizontal alignment, and use plates to control the vertical alignment.
You can do this by utilising some Technic pieces - CV or U joints. Each solution requires two of each element.
Technic, Universal Joint 3L
Technic, Steering CV Joint Axle
Technic, Steering CV Joint
Technic, Steering CV Joint Axle, Wide
Technic, Steering CV Joint, Large Ball