What kind of creatures are subject to Phantom Rogue’s Tokens of the Departed?

This might get a little fiddly, but I was curious how people would rule on this aspect of Phantom Rogue’s level 13 feature, "Tokens of the Departed"

When a life ends in your presence, you’re able to snatch a token from the departing soul, a sliver of its life essence that takes physical form: as a reaction when a creature you can see dies within 30 feet of you, you can open your free hand and cause a Tiny trinket to appear there, a soul trinket. The DM determines the trinket’s form or has you roll on the Trinkets table in the Player’s Handbook to generate it.

Do you think that the creature necessarily needs a soul to be able to use this feature? IE, would this work on undead or constructs? Flavor text uses "soul" but RAW mechanic just says "when a creature dies" and "has soul" and "does not have soul" aren’t properties of a stat-block.

Thanks for your time.