I don't know where you are getting your figures, but according to the official German penetration tables, at 1,000 meters the Panzergranite 39 could penetrate 72mm and the tungsten cored Panzergranite 40 penetrate 69mm. You might be looking at the KWK40 L/70 from the Panther. The maximum armor on the Panzer IV was 50mm on the hull front, turret front and mantlet and 30mm anywhere else. That was easily penetrated by any round from the M-3 gun at 1,000 yards and with M-61 APC at 1,500 yards.
The Sherman's glacis plate was originally 50.8 mm (2.00 in) thick.[100][102] and angled at 56 degrees from the vertical, providing an effective thickness of 90.8 mm that means a Panzer IV could only penetrate the frontal armor of a Sherman at 500 meters or less. If the Sherman had the later 47-degree hull front, it was the equivalent of 93mm and the Panzer IV could only penetrate it at less than 100 meters.
For a tank that was "always going to lose vs dedicated tanks" it killed a lot of German tanks.
The figures I was quoting are from US ordnance testing. They wanted to confirm actual performance vs calculated.
They tested pretty much every AT gun out there. Very, very rarely does actual performance equal the calculated estimates.