Thank you @opalmirror for your explanation! After a couple more tries and research, I managed to solve the problem by replacing the matrix Q from cv2.stereoRectify with this value:
Q = np.float32([[1, 0, 0, 0],