Export to MP3 causes a change in volume

I have a project where, when exporting to .wav, the amplitude is unchanged, but when exporting to .mp3, the amplitude is reduced by 0.529 dB.

Link to the project and the resulting exports.

Audacity version 3.4.2 on Arch Linux.

export settings for MP3:
current screenshot

MP3 is lossy compression. The wave shape changes and usually some peaks go up and other peaks go down.

I wouldn’t expect the RMS or LUFS loudness to change significantly, but of course lossy compression is not perfect.

It’s pretty common for the new-highest peaks to go up, so frequently the peak is higher on the MP3 than the highest peak on the WAV.

This isn’t an issue with peaks, this is the volume as a whole. The sine wave at the end of the example is 0.529 dB quieter, which shouldn’t happen.