You can prove this to yourself if you want to.
Take any random audio file you have. Save a copy as uncompressed wave. Save a second copy as FLAC--note that it IS a much smaller file size.
Re-open both versions in your DAW and line them up in a multitrack session. Invert the polarity of one of them--doesn't matter which then mix/render them together. The result will be a flat line of silence indicating perfect polarity cancellation which in turn proves both files were identical despite one being compressed in FLAC.
If you want a laugh, try the same thing with MP3.