IIRC, the Panther's gun is a later model 75mm with a higher muzzle velocity than the Pz.IV. It should be more effective overall.
Edit:
Our Panzer IV Ausf G is armed with the KwK 40 L/48, which is an upgraded armament designed to counter the early T-34s. The Panther was armed with the KwK 42 L/70, considered to be the best German 75 mm gun of the war, if not the best 75mm gun of the war outright. It had very high muzzle velocity and for antitank purposes could compete with the 88mm guns of the Tiger I.