Do I lose pixel information if I use landscape mode? I thought the camera sensor has a defined maximum resolution.

But in landscape it records a photo in 16/9 format, while in portrait it takes 3/4 ratio.

So is it better to force portrait mode and postprocess the pictures into landscape, if desired?
The orientation you take the photo doesn't affect the pixel information in the image at all. The camera still records an image of (for example) 3456x2304 pixels, whichever way up the phone is. It also sets a flag in the JPEG file to note the correct orientation of the photo. Then, when the photo is displayed, it's losslessly rotated when reading the file, so that it appears in the correct orientation.

A few years ago, this would lead to some image viewers showing the photo in the wrong orientation, because they didn't understand the flag, but almost all photo software (and even embedded software, such as in smart TVs and digital photo frames) can use the correct orientation today.

If you like, it's still possible to postprocess the image. A special tool (such as exiftran on GNU/Linux) can read the image and the flag, apply the correct rotation, and write out the rotated image. It uses a special trick to rotate the image without having to decompress and recompress the JPEG file: this way, there is no loss of quality.