It's hard to say for sure. Different people might have different ideas of how the story ideally should have ended depending on their expectations and interpretations.
It depends on the genre and the themes of the story. Different types of stories might have very different ideal endings based on what the readers or viewers expect and what the story has built up to.
Fanfiction can change the tragic ending by simply changing one key decision. For example, if Anakin decides not to trust Palpatine's lies about saving Padmé from death. This one change could lead to a completely different outcome where Anakin remains a Jedi and the Sith's plot is foiled.
The novel of Revenge of the Sith is canon. It aligns with the established Star Wars canon framework and adds depth and detail to the events depicted in the movie of the same name.