I think a cargo hold fire sufficient to kill the pilots would have destroyed the aircraft.
But (need help from knowledgeable FReepers here) there is an avionics bay under the cockpit which is accessed by a hatch behind the cockpit door. I don’t know if that bay has a fire suppression system. Suppose a slow fire started there, slow enough to kill the systems one by one. Suppose also that the fire generated enough CO to kill the pilots before it burned out. CO intoxication is very sneaky, it’s not like smoke inflation or toxic fumes.
With the cockpit door secured, and two dead pilots, could a 777 fly that long?
With the FMS on a 777? I’d hazard “yes,” as long as they don’t run into icing or turbulence. The FMS on modern airliners has reduced the pilots to being glorified bus drivers - except the bus drivers have to do more work in the middle of their route than many airline pilots need to do now.
The one wrinkle in your theory is that Boeing designs the flight deck of their aircraft to have positive pressure differential from the cargo deck and passenger space - to prevent intrusion of gases into the flight deck.
What I’m wondering is if the fire could disable enough of the circuitry of the 777 to effect a loss of power to the transponder and some other flight systems to result in what happened.
All of this speculation still doesn’t answer the question of “why the climb to FL 450?”