Walid Soliman, who earned his first competitive action with Egypt in the Pan Arab Games, opened the scoring eight minutes after re-start.
Hassan Gomaa extended the lead five minutes later as Petrojet seemed to be on course for a comfortable victory.
However, Masri pulled one back through Ahmed Galal six minutes past the hour mark before Ibrahim Hilal grabbed the equalizer in the 77th minute.
Abdul-Ghani restored the lead for Petrojet nine minutes from time and Shaaban ensured the victory in stoppage time.
The resilient Petrojet are still on top of the table with 25 points, two ahead of second-placed Al-Gaish.
The defeat widened Masri crisis as the Port Said-based club lie third from bottom on just nine points.
Elsewhere, Harras Al-Hodoud claimed their third win this season following a 3-1 away victory over Tersana.
Ahmed Abdul-Ghani fired Al-Hodoud in front in the 36th minute before Ahmed Hamed doubled the lead from the spot in the 58th minute.
Tersana midfielder Hani Hassan notched a lifeline two minutes later but Ahmed Samir killed off the hosts' hopes in the 73rd minute.