Hi I’m having the same issue with iPhone videos playing sideways on my Sony android TV.
Plex/Sony android may be ignoring the ‘Rotation’ metadata of the video stream.
For videos I have with the tag ‘rotation: 0’, the video plays correctly. This is for videos taken with the phone held landscape.
All videos taken in portrait have the tag ‘rotation: 90’. The video plays correctly on all devices except on Plex/Sony android TV. Instead it plays rotated by 90 degrees and stretched to fit the screen. However the thumbnail and preview pictures are orientated correctly.
At the moment a fix appears to be to use ffmpeg to transpose the orientation of the pixel matrix of media files that were taken in portrait. Then the player doesn’t need to apply a rotation, although I haven’t tried it myself (hundreds of videos)! Hope this helps.