https://github.com/discourse/discourse/commit/70050a8ba365628394fbf7597daf75891328d991
You’ve encountered a known (if obscure!) bug, which was fixed by the above commit. That commit is not yet in a stable release of Discourse, however.
Temporarily setting recompress original jpg quality
to 100 should prevent the conversion from happening.
(…and/or you could try dropping the quality of the png you’re exporting to be less than the value of the recompress original jpg quality
setting.)
Just make sure you return that setting back to the previous value after your logo has been uploaded!