What happens if the caster of the Imperius Curse dies?
If they die, or are weakened enough, it lifts.
When the caster of the Imperius Curse is sufficiently weakened, they no longer have the ability to impose their will on another’s and those they controlled are released from their curse. When the Dark Lord Imperiused Barty Crouch Sr., Barty Crouch Jr. was released from his father’s Imperius Curse as a clear direct result.
“It was very quick. My father was placed under the Imperius Curse by my master. Now my father was the one imprisoned, controlled. My master forced him to go about his business as usual, to act as though nothing was wrong. And I was released. I awoke. I was myself again, alive as I hadn’t been in years.”
- Harry Potter and the Goblet of Fire, Chapter 35 (Veritaserum)
Death would also result in the Imperius Curses cast being lifted. All it takes to lift it is the caster being weakened sufficiently, which would indicate that their death almost certainly would work, as they’re no longer even alive to impose their will. After the Dark Lord was ripped from his body, Imperius Curses lifted, which Hagrid said meant wouldn’t have happened if the Dark Lord was coming back, implying that the Dark Lord couldn’t easily return.
“Some say he died. Codswallop, in my opinion. Dunno if he had enough human left in him to die. Some say he’s still out there, bidin’ his time, like, but I don’ believe it. People who was on his side came back ter ours. Some of ’em came outta kinda trances. Don’ reckon they could’ve done if he was comin’ back.”
- Harry Potter and the Philosopher's Stone, Chapter 4 (The Keeper of the Keys)
That Hagrid considered Imperius Curses breaking a sign the Dark Lord wasn’t coming back indicates the caster actually dying should break the Imperius Curses they cast. This is logical, as dying certainly weakens the caster to where they can’t impose their own will. Similarly, when the Dark Lord dies and the Death Eaters are all killed, captured, or escaped into hiding, those they had Imperiused were released from the Imperius Curse.
“He must speak to the bereaved, clasp their hands, witness their tears, receive their thanks, hear the news now creeping in from every quarter, as the morning drew on, that the Imperiused up and down the country had come back to themselves, that Death Eaters were fleeing or else being captured, that the innocent of Azkaban were being released at that very moment, and that Kingsley Shacklebolt had been named temporary Minister for Magic …”
- Harry Potter and the Deathly Hallows, Chapter 36 (The Flaw in the Plan)
The Dark Lord had died, however, it’s very unlikely that the Dark Lord had personally Imperiused all of them himself, and there aren’t any that we know he’d Imperiused himself. Yaxley had done Pius Thicknesse, for example. However, what happened to the Death Eaters (death, capture, and escape) released those they’d Imperiused.
The Curse is lifted
In The Deathly Hallows, after Voldemort is killed the Imperiused start to wake up. Whilst it isn't entirely clear if it lifts because the remaining Death Eaters are not concentrating on keeping the curse up, at least some of the Imperiused must have been controlled by Voldemort and they were waking up too.
Including the full quote for context:
The bang was like a cannon blast, and the golden flames that erupted between them, at the dead center of the circle they had been treading, marked the point where the spells collided. Harry saw Voldemort’s green jet meet his own spell, saw the Elder Wand fly high, dark against the sunrise, spinning across the enchanted ceiling like the head of Nagini, spinning through the air toward the master it would not kill, who had come to take full possession of it at last. And Harry, with the unerring skill of the Seeker, caught the wand in his free hand as Voldemort fell backward, arms splayed, the slit pupils of the scarlet eyes rolling upward. Tom Riddle hit the floor with a mundane finality, his body feeble and shrunken, the white hands empty, the snakelike face vacant and unknowing. Voldemort was dead, killed by his own rebounding curse, and Harry stood with two wands in his hand, staring down at his enemy’s shell.
One shivering second of silence, the shock of the moment suspended: and then the tumult broke around Harry as the screams and the cheers and the roars of the watchers rent the air. The fierce new sun dazzled the windows as they thundered toward him, and the first to reach him were Ron and Hermione, and it was their arms that were wrapped around him, their incomprehensible shouts that deafened him. Then Ginny, Neville, and Luna were there, and then all the Weasleys and Hagrid, and Kingsley and McGonagall and Flitwick and Sprout, and Harry could not hear a word that anyone was shouting, nor tell whose hands were seizing him, pulling him, trying to hug some part of him, hundreds of them pressing in, all of them determined to touch the Boy Who Lived, the reason it was over at last —
The sun rose steadily over Hogwarts, and the Great Hall blazed with life and light. Harry was an indispensable part of the mingled outpourings of jubilation and mourning, of grief and celebration. They wanted him there with them, their leader and symbol, their savior and their guide, and that he had not slept, that he craved the company of only a few of them, seemed to occur to no one. He must speak to the bereaved, clasp their hands, witness their tears, receive their thanks, hear the news now creeping in from every quarter as the morning drew on; that the Imperiused up and down the country had come back to themselves, that Death Eaters were fleeing or else being captured, that the innocent of Azkaban were being released at that very moment, and that Kingsley Shacklebolt had been named temporary Minister of Magic...
Harry Potter and the Deathly Hallows, Chapter 36, "The Flaw in the Plan"
It will probably be lifted
The first and obvious evidence is when Harry immobilized with Dumbledore's spell, he breaks free the moment Dumbledore died.
Snape raised his wand and pointed it directly at Dumbledore.
A jet of green light shot from the end of Snape’s wand and hit Dumbledore squarely in the chest. Harry’s scream of horror never left him; silent and unmoving, he was forced to watch as Dumbledore was blasted into the air: for a split second he seemed to hang suspended beneath the shining skull, and then he fell slowly backwards, like a great rag doll, over the battlements and out of sight.
He seized Malfoy by the scruff of the neck and forced him through the door ahead of the rest; Greyback and the squat brother and sister followed, the latter both panting excitedly. As they vanished through the door, Harry realized he could move again. What was now holding him paralyzed against the wall was not magic, but horror and shock.
Harry Potter and the Half-Blood Prince, chapter 28, Flight of the Prince