If anything, they could have eased the transition from Optimus to Rodimus a bit.
Like, have it be that Hot Rod still attempted to tackle Megatron, but accidentally tripped and wound up jumping in between Optimus and Megatron, taking the shot from Megatron meant for Optimus. Hot Rod would then be the one wounded in this scene, prompting Optimus to avenge him and still pummel Megatron like in the final version of the movie. Hot Rod would then be the one who is treated, and actually recover (since he was a new toy at the time, so he's gotta recover).
Optimus would then be under the impression that Hot Rod took the shot on purpose and bravely through himself between Optimus and Megatron to save Prime's life, unaware that Hot Rod was actually just trying to show off. He'd thus sense some hidden potential in Hot Rod and take him under his wing, following him around for the rest of the movie. Hot Rod, however, would not reciprocate Prime's new interest in him because he (Hot Rod) would instead feel that he actually blundered his big moment to be a hero and think Prime is teasing him, unaware that Optimus's interest in him is sincere.
The rest of the movie would basically play out the same, only with Optimus joining Hot Rod, Kup, and the Dinobots on their voyage to Cybertron while the others go with Ultra Magnus (to whom Optimus would have still given the Matrix, but to keep it safe as he'd sense its being in danger and would use himself as a decoy to divert Galvatron away from the Matrix, unaware that Unicron could sense the Matrix in Magnus and direct Galvatron to him instead of Prime). When Prime, Hot Rod, Kup, and Dinobots would reunite with the others on Junkion, Optimus would realize his mistake of putting Magnus in danger (since the Decepticons blew him up to get the Matrix), and around this point, Hot Rod would recognize that even Optimus is not infallible and the two would finally have a long-awaited moment of reconciliation, allowing Hot Rod to mature a bit more in foreshadowing things yet to come.
During the final battle inside Unicron, one of two things could then play out. Either Hot Rod gets separated from everyone and still retrieves the Matrix from Galvatron by himself (like in the final movie), with Optimus ending up with the others... OR, both Hot Rod and Optimus get separated from the others and team up to get the Matrix back from Galvatron together, with Optimus personally witnessing Hot Rod's transformation into Rodimus Prime. Either way, after Unicron blows up, the final scene on Cybertron could see Optimus officially passing leadership over to Rodimus, with Optimus stepping down in retirement and showing to the movie's young viewers that he is personally endorsing Rodimus as the new leader, letting them know that this is an acceptable thing. It's okay to like Rodimus Prime, kids.
Or, if Optimus still has to die, he could have done so when teaming up with Hot Rod to try taking the Matrix back from Galvatron, making a heroic sacrifice to ensure that Hot Rod gets the Matrix and becomes Rodimus Prime. After Rodimus would throw Galvatron out of Unicron, he and Optimus would have one final farewell scene before Rodimus opens the Matrix, with Optimus basically saying that this is something that must happen, "Do not grieve", "'Till all are one", etc. Otherwise, I can't see Optimus having as emotionally meaningful a death if he instead ends up with the others separated from Hot Rod. Anyway, the final scene would thus be a little more melancholic and not quite as triumphant as in the final movie, but perhaps it could be spun as less of a sad farewell to Optimus and more of an honorable "Thank you for everything/I promise to live up to your example" kind of example to end the film on a more hopeful note. The final speech given in the actual movie could still be used to close it out with some sense of triumph, at least.
In other words, this is more or less how I wish Deviations had gone down.