FLAC audio in movies a good idea

I am curious if including a FLAC surround sound track in my MKVs is a good idea. I would think using lossless audio and just having Plex re-encode on the fly for each device would work fine, I’m just concerned about audio quality that Plex will encode the audio at. File size and encoding is not an issue here.

I prefer lossless audio, but I keep the native format from the disc (i.e. DTS-X/Atmos/DTS-HD MA/TrueHD).

Best to just keep the native lossless assuming you have the storage space. The problem is that some encoding programs (such as Handbrake) can’t decode the lossless soundtracks such as DTS-HD…so when you transcode it to something else (FLAC, in this instance), it is only transcoding the lossy core. You’d be making a lossless transcode of an already lossy track.

I only use FLAC when the audio is originally stored on the disc as PCM.
In all other situations, I take the audio in its original format.