Hear me out but if you play as William Afton in Ultimate custom night FNaF then why can you see all the nightmares? Since Michael Afton sees the nightmare animatronics (in my opinion, people think you play as Evan Afton in FNaF 4 but by this point Evan is Dead), then I assume Golden Freddy mistook Michael for William, as seen in Sister location, where the Funtime animatronics mistake him for William and combine into Ennard to Wear Michael as a suit. As Michael burns in Pizzeria simulator and dies, Cassidy might have seen Michael and William Afton dead in the building and taken the wrong person. As to why William Afton came back in the next game.