I would rotate, and then resize (or vice versa). Let's assume you want
the output video to be 1280 pixels wide, and the height to be proportional
to the input aspect ratio.
ffmpeg -i movie.mp4 -filter_complex "  transpose=dir=2
[rotated] ; [rotated] scale=1280:-2 " fixed_movie.mp4
-2 argument makes the output height equal to the
appropriate aspect ratio, but divisible by 2.