First, get the window into the parked position however you can, or as close as you can.
Expose the motor (pull the headliner off). Pull the motor assembly off the track, leave wires attached. Reconnect the switch panel to the hanging wires. Use the tilt and slide buttons to run the motor and observe the pattern:
Tilt ----- Parked ---- slide 1/2 ---- slide end.
Both tilt and slide buttons just run the same motor. The only difference between tilt and slide is just crossing over a certain imaginary point along the track, marked "parked" above.
When the motor is one one side of the parked point, only the slide button works and the tilt button does nothing.
On the other side of the point, only the tilt button works and the slide buttons are ignored.
Also when you are sliding from parked to open, the motor runs in one continuous run from parked to open as long as you hold the button, until the end of the run. It stops on it's own even though there is nothing stopping it. But when sliding from open to closed, it stops at the half way point and you have to release and press slide forward again, and it runs the remaining half way to the parked position.
Run the motor through all those positions a few times and get the pattern and figure out where you "are" at any given time.
Now just put the motor in the parked position.
Then put the window in the parked/closed position. Manually move the tracks. pay attention to how level it is from left to right.
Put the motor back on the track.
Run the window through all positions and look for even levelness from left to right, look that it parks closed in the right spot, centered in the roof opening. That it doesn't seem to be straining trying to go beyond te stops at either end. If it needs adjustment, just park it, pull the motor, nudge one or the othe track a tooth or two by using a flat head screw driver in the hole where the motor gear normally goes. Put the motor back in and test again.
Then just put the headliner back.