TL;DR In canon the Fidelius Charm is inconsistently presented. It smacks of deus ex machina and seems to be clumsily applied mainly to smooth out or facilitate plot points that need some assistance getting from point A to point B. There is not a satisfactory answer as to why the charm broke in the way that it did because Fidelius does not have defined parameters. ETA: Regarding your comment to Pureferret, it doesn't make sense that the charm broke while Harry was still alive. It's a great question. It's just that there is no authoritative canon-based answer and the supplemental information provided by J.K. Rowling doesn't explain it either. There is absolutely no canon evidence that Wormtail "undid" the charm prior to Voldemort killing the Potters. Hence my concerns with the workings of the Fidelius Charm in general.
The long version:
Response to both your question and mine on the Fidelius Charm show how confusing canon is surrounding this issue. Since I asked about Fidelius, I've done a lot of digging and reading and have concluded Fidelius is probably somewhat of a deus ex machina. When canon isn't clear and J.K. Rowling provides what is supposed to be clarifying information to be considered alongside what she's written in canon, it's truly difficult to suss it out. :) Here are some examples of what's been said about the Fidelius Charm:
‘An immensely complex spell,’ [Flitwick] said squeakily, ‘involving the magical concealment of a secret inside a single, living soul. The information is hidden inside the chosen person, or Secret-Keeper, and is henceforth impossible to find – unless, of course, the Secret- Keeper chooses to divulge it. As long as the Secret-Keeper refused to speak, You-Know-Who could search the village where Lily and James were staying for years and never find them, not even if he had his nose pressed against their sitting-room window!’
Prisoner of Azkaban - pages 152-153 - Bloomsbury - chapter 10, The Marauder's Map
This is the first canon description of the Fidelius Charm, so this is what we have to go by off the bat.
‘Here,’ Moody muttered, thrusting a piece of parchment towards Harry’s Disillusioned hand and holding his lit wand close to it, so as to illuminate the writing. ‘Read quickly and memorise.’
Harry looked down at the piece of paper. The narrow handwriting was vaguely familiar. It said:
The Headquarters of the Order of the Phoenix may be found at number twelve, Grimmauld Place, London.
Order of the Phoenix - page 57 - Bloomsbury - chapter 3, The Advance Guard
Here we are shown how a Secret-Keeper can share the secret with others, by telling them directly. So far we can assume that a secret can be divulged verbally (Peter Pettigrew, we assume) and through writing. As well, appropriately, Harry cannot see No. Twelve Grimmauld Place until well after he's read Dumbledore's message. (I do have an overall point)
They were often joined by other Order members for dinner now, because The Burrow had replaced number twelve, Grimmauld Place as the Headquarters.
Mr Weasley had explained that after the death of Dumbledore, their Secret Keeper, each of the people to whom Dumbledore had confided Grimmauld Place’s location had become a Secret Keeper in turn.
‘And as there are around twenty of us, that greatly dilutes the power of the Fidelius Charm. Twenty times as many opportunities for the Death Eaters to get the secret out of somebody. We can’t expect it to hold much longer.’
Deathly Hallows - page 79 - Bloomsbury - chapter 6, The Ghoul in Pyjamas
Now we learn that the Fidelius Charm may be complex, but it's not as stable as some spells. It dilutes as a new person is told the secret and becomes weaker. Okay. It's also noted that the headquarters for the Order of the Phoenix have relocated from Grimmauld to the Burrow. There's no indication of whether or not the Burrow was placed under the Fidelius Charm as well. (Personally, I think headquartering the Order's headquarters at the Burrow would be far more obvious to the Death Eaters than Grimmauld Place, and even more dangerous. Although, I suppose, to be fair, Kreacher did rat out the Order to Narcissa Malfoy in Order of the Phoenix)
Regarding Yaxley in Deathly Hallows:
‘Harry, I think he can. I – I forced him to let go with a Revulsion Jinx, but I’d already taken him inside the Fidelius Charm’s protection. Since Dumbledore died, we’re Secret Keepers, so I’ve given him the secret, haven’t I?’
Deathly Hallows - page 223 - Bloomsbury - chapter 14, The Thief
Wait. WHAT? Now an outsider can learn a Fidelius secret by osmosis, just by having accidental contact with whatever is being protected by Fidelius? According to Flitwick's description of Fidelius in Prisoner of Azkaban, a secret must be specifically divulged to another person, and the two examples we saw of divulging a secret previously were through writing or verbally. So Yaxley just knew, even though nothing was explained to him? As well, Mr. Weasley had informed Harry that the Order's headquarters had been moved to a new location. There is no explanation as to why the trio couldn't have immediately stunned Yaxley and tossed him right out of No. Twelve Grimmauld Place because the Fidelius Charm originally protecting Grimmauld specifically involved the address for the headquarters of the Order of the Phoenix. It wasn't Oh, and by the way, Harry Potter is hiding out here at number twelve Grimmauld Place. By the time Yaxley hit the hearth, Grimmauld was not headquarters anymore. So exactly what secret was divulged? And how?
‘I’ve been getting them all out of The Burrow,’ he explained. ‘Moved them to Muriel’s. The Death Eaters know Ron’s with you now, they’re bound to target the family – don’t apologise,’ he added, at the sight of Harry’s expression. ‘It was always a matter of time, Dad’s been saying so for months. We’re the biggest blood traitor family there is.’
‘How are they protected?’ asked Harry.
‘Fidelius Charm. Dad’s Secret Keeper. And we’ve done it on this cottage too; I’m Secret Keeper here.
Deathly Hallows - page 390 - Bloomsbury - chapter 24, The Wandmaker
So Shell Cottage was under the Fidelius Charm at the moment Dobby Apparated the trio out from Malfoy Manor. How is it possible that Harry could see it, see it's lights, and see people moving about inside before Bill Weasley told Harry about the charm and that he (Bill) was the Secret Keeper for Shell Cottage? (Bill also rather blithely tells Harry that a group of Weasleys -- which might include Ginny -- was under the protection of Fidelius at Auntie Muriel's. For the Weasleys' continued protection, it would have been wiser for Bill not to tell Harry this information. There wasn't a pressing need for Harry to know where the Weasleys were at that moment in time.).
Here is what J.K. Rowling has to say about Fidelius:
What happens to a secret when the Secret-Keeper dies?
I was surprised that this question won, because it is not the one that I’d have voted for… but hey, if this is what you want to know, this is what you want to know!
When a Secret-Keeper dies, their secret dies with them, or, to put it another way, the status of their secret will remain as it was at the moment of their death. Everybody in whom they confided will continue to know the hidden information, but nobody else.
Just in case you have forgotten exactly how the Fidelius Charm works, it is “an immensely complex spell involving the magical concealment of a secret inside a single, living soul. The information is hidden inside the chosen person, or Secret-Keeper, and is henceforth impossible to find — unless, of course, the Secret-Keeper chooses to divulge it” (Harry Potter and the Prisoner of Azkaban)
In other words, a secret (eg, the location of a family in hiding, like the Potters) is enchanted so that it is protected by a single Keeper (in our example, Peter Pettigrew, a.k.a. Wormtail). Thenceforth nobody else – not even the subjects of the secret themselves – can divulge the secret. Even if one of the Potters had been captured, force fed Veritaserum or placed under the Imperius Curse, they would not have been able to give away the whereabouts of the other two. The only people who ever knew their precise location were those whom Wormtail had told directly, but none of them would have been able to pass on the information.¹
So how could Yaxley have known even a smidgen of information regarding Grimmauld Place?
See how muddy the water is?
This is a really, really long post to demonstrate why I think the answer to your question is that it's unclear why the charm broke. The information surrounding Fidelius is inconsistent and appears to be infinite, meaning there aren't fixed parameters around the magic involved. Fidelius just seems to keep morphing and changing as canon goes along.
¹This was on J.K. Rowling's website for years, but she's taken down all her Potter information in order to put it up on Pottermore. Link courtesy of the Wayback Machine
subjects of a Fidelius Charmmight be the "owners" of the house here. Harry definitely wasn't the owner when Fidelius Charm was put in action.