The really fucked up part is that we hear Palpatine using Kanan’s voice right after before he’s revealed in the same portal and the portal has a Sith symbol on it. The image of Kanan in the flames was just an illusion to trick Ezra into pulling Sidious through, there never was a chance to save him.