With a few years to think about it and even try to revisit both games, I'm gonna say XIII and the script used to be flipped at the time XV came out.
When XV came out, I personally celebrated it as "FF's return to form." Now, to be honest, I did really enjoy my time with XV at launch, but ever since I finished it, it's been incredibly hard to go back and enjoy it again (and I've tried, as mid-gen console updates rolled out, as PC version launched), etc... Also, its obvious incompletion (relying on a movie to tell big parts of the narrative, for instance) has only ended up being more and more disappointing in the long run for me. I don't HATE XV, but my viewpoint of it has cooled greatly since.
Now, I only thought of XV as the "return to form" because upon first contact, I loathed both XIII and XIV 1.0. I played and enjoyed XIV 2.0 for just a few months but not enough to kinda credit it with "restoring" Final Fantasy to good graces.
However, upon revisiting XIII and kind of going through a lot of attitude and perspective changes around what I expect from a game, nevermind a game bearing the name Final Fantasy, since my first contact with it, it's... Not horrible. Like, it's still probably my least favorite number-bearing FF game, but I don't think it's bad anymore. If they could have gracefully introduced the entire suite of mechanics much earlier and perhaps not tried to tell a story in such a scattershot manner, I think I'd feel a lot better (those aspects of the game still kinda drag it down for me), but since its initial release, I've revisited it and followed conversations from people who liked it to begin with and I'm convinced that it's a much better game than I initially gave it credit for, even if it doesn't quite stand out to me as one of the best FF games in the series.