The players were exploring Castle Ravenloft. A trap separated the human paladin from the rest of the party and placed him in a deep pit with no light source. In looking for a way out, he accidently released and then began to fight a wight. This was initially quite bad as he was attacking with disadvantage, while the wight (with darkvision) was attacking twice with advantage. The paladin remedied this by casting Branding Smite, hitting the wight, and making it glow.
Branding Smite, emphasis mine:
The next time you hit a creature with a weapon attack before this spell ends, the weapon gleams with astral radiance as you strike. The attack deals an extra 2d6 radiant damage to the target, which becomes visible if it is invisible, and the target sheds dim light in a 5-foot radius and can’t become invisible until the spell ends.
After two more hits and some Divine Smite, the wight was dead. The paladin wanted to hack off a piece of the glowing wight corpse and use it as a light source to help him climb out of the pit (spell duration is Concentration - 1 minute, the paladin needed three rounds to climb out of the pit). I hesitated, because when the wight ceased to be undead and became just dead, it was transformed from a creature into an object and was thus no longer a valid target of the spell.
Ultimately I ruled that one thing is a valid target for casting the spell itself, another is the persistent effects of the spell, and that the corpse would go on glowing for the duration. However, I would like to know RAW for this and whether all the effects of the spell would cease when the wight was killed.
Related: Is a target suppressed or removed when the target becomes invalid?. Superficially this might appear like a duplicate of my question. However, the question there is about the dominate person spell when the target is no longer a Humanoid because of polymorph. Obviously dominate person cannot continue to work if the target is no longer a Humanoid to dominate, but a dead wight could still continue to be a source of light. I feel like that question is a different situation than Branding Smite where the 2d6 radiant damage is the spell itself and the light produced is a persistent effect of the spell. Maybe the answer is not different, but I believe the question is different enough that it stands on its own.
Also, although not a reason to say that this is not a duplicate, I am unsatisfied with the accepted answer to that question being based on a Crawford tweet.
It has been suggested that this question is a duplicate of If a creature was flying via the Fly spell and it dies, does it continue flying? I do not consider this a duplicate of that question for two reasons. First, Fly requires a willing target which is an added complication that I don't want to address (and which is not adequately addressed in the answers to that question) and second, because independent of the question of whether effects carry over to an invalid target, it is nonsensical for an object to have a flying movement since it has no way to use movement. In that sense it is equivalent to the dominate person question. However, there is no inherent contradiction to an object being able cast light (and in fact other objects in the game do cast light, whereas I don't know of any objects that move).
If this question is to be marked as a duplicate, I would prefer that it be marked as a duplicate of Would the Animate Objects spell end an ongoing spell affecting the targeted object(s)? In that case, as in my question, there is not the complication of the original spell requiring a willing target. Further, there is no inherent contradiction in a creature instead of an object dealing heat damage when it is touched, as there are creatures in the game that deal damage when touched, such as an Azer.