I'm not sure. You could try adjusting the two rubber guides at the side, as they may be misaligned. They should guide the window up correctly. Do you mean the window is coming off the central track/rail? That shouldn't be possible, as the window is bolted to the guide which is fixed to the central track.
Is your window regulator broken? Mistrack? Broken cable? If mistrack I never dealt with issues like that but I’m willing to help cuz I just finsh mine today RSX FOR THE WIN