RAW, yes. But there's a case for no.
The case is rooted back in Apocalypse World, which had a slightly different method for awarding XP. Instead of failed rolls, players highlighted other players' stats, and any roll against those stats, pass or fail, would mark XP.
But there were moves which didn't use stats. Burning through an angel kit to stabilize someone required you to spend charges and roll +spent. Dishing out money to make it known you wanted something worked similarly, and you can see echoes of those moves in Carouse in Dungeon World, which burns through your coin to similar effect.
"An angel kit", though, isn't a stat. "Barter" isn't a stat. So doing those things could never mark XP, and it's arguable that it's better in Dungeon World that even unconventional moves can contribute to that. There's another such statless move that hits a little closer to Last Breath, though.
The Harm Move: A Forced Move You Want To Fail
...yeah, that sums it up. Short version: when you get hurt, roll +harm taken. On a 10+ take a major setback or two minors, on a 7-9 take a minor, on a 6- the GM can trade 1-harm for a minor.
I don't think anything else in the game works quite like it. You could replace it with rolling +2-harm for the same odds and "normal" result bucket values, but that's a weird bit of math for the sake of consistency. You could easily come up with your own custom parallel stuff like "when the orc devastator hits you with their wrecking hook, roll +your armor" that, again, you want to fail.
But it's actually the "forced move" part of this that plays into why you might not want to award XP for failing a Last Breath roll.
No Choice = No XP
Harm doesn't drop out of a clear blue sky. When you make the harm move it's usually, though admittedly not always, a result of an earlier move, which might have awarded you XP.
Similarly, when you make the Last Breath move, it's not a deliberate choice by your character, but rather it comes as fallout from an earlier move, which might have awarded you XP, either directly through failure or indirectly toward furthering an alignment or a bond or getting a "yes" out of one of those end-of-session questions.
For Further Consideration
Admittedly this probably isn't going to matter one way or the other. People aren't going to slit their own throats and hope for a clean death so they can come back with enough XP for the next level.
But when you make custom moves, keep these two cases in mind: the involuntary move that happens as a knock-on effect, and the move with flipped results that you're hoping to fail. Awarding XP on failure is a rule that you as the GM can break, like any other rule, and for one or both of those cases you're probably going to want to do it.