JPG files have a "metadata" section embedded into the photographs, known as EXIF data. Most likely the photo is always being stored the same way with EXIF data defining the orientation. The photo frame is likely not correctly reading the EXIF data and reorienting the photos.
You can likely fix this problem by using a graphics program to rotate the photos 90 degrees and then save them. This will result in a slight degradation of quality, but for day-to-day use, nothing to noticeable (but save the originals if they are valuable). Unfortunately all photos you want to re-orientate will need to be edited. Without knowing the OS you are using its not possible to advise the software to use to re-orientate the photos. I'm sure GIMP will do it, and I am sure there are plenty other programs as well.
I happen to have a Xiaomi A1 as well. I love my phone, but the camera function is actually not particularly impressive, and neither is the software- although the 2x optical zoom and interface is a nice touch and it is very easy to use. I replaced Android One with LineageOS, and part of this required replacing the camera software. I note that my new camera is A LOT more powerful (but I miss how easy optical zoom was on the original app). I have just taken some photos with my current app, and it saves the files "correctly" oriented rather then using EXIF information. This means you can likely find an alternative camera app which will save new files in such a way that the photo frame will just handle them, but without some hacking you may loose the functionality of your 2x optical zoom. (Google Camera can do it, but may require some hacking)