That is the most devastating finish I've had the misfortune to witness.
Porsche deserved that win, the race was not for 23 hours, 57 minutes, the race was for 24 hours plus the time it took for Porsche to take the flag. It was a crushing defeat for Toyota, but ultimately, it was Toyota's loss, and therefore Porsche's win.
The absolutely disgusting part, and what I have a problem with, was the ruling against #5 even being classified, for having stopped on the track right after the line (at least as far as I can tell - the stewards cited regulation 10.15, and the only applicable part of that regulation is 10.15.2(a)'s requirement to not stop on track to await the checkered flag). #5 completed the same number of laps as the winner, they should have been classified as the winner, especially considering the ACO allowed Peugeot to do the same thing, but even more blatantly, in the past. Audi did not want that podium that way, it's clear.
(This is also the second time Toyota's completed a full race lap under solely hybrid power, the first time being at Spa. They were counted as having completed 384 laps, so I'll count it as completing the lap, but being excluded from classification for the 10.15.2(a) violation.)
Edit: Looks like it was actually Le Mans-specific rule 10.15.2(e), which is for the last lap being over 6 minutes.