Immunity is not formally defined beyond its natural language meaning
From Monster Manual, page 8:
Vulnerabilities, Resistances, and Immunities
Some creatures have vulnerability, resistance, or immunity to certain types of damage. Particular creatures are even resistant or immune to damage from nonmagical attacks (a magical attack is an attack ...
The section on damage threshold is probably your best bet
I could not find any sort of formal definition but the following exists, from the section on "Damage Thresholds" (DMG, 247):
An object with a damage threshold has immunity to all damage unless it takes an amount of damage from a single attack or effect equal to or greater than its damage threshold,...
There is no rule for immunity, but it is not needed
There are no creatures described in the official books which are explicitly immune to this particular action from this particular stats block. That does not mean there are no such creatures in your game world tho. Quite the contrary, the Monster Manual suggests the DM not to be restricted by it:
The reasons ghosts can be affected is because rules-as-written they aren't immune to the strength drain effect, only the necrotic damage. Based on the various discussion threads I've seen, many DMs house-rule that anything immune to necrotic ignores the strength drain effect as well.
Currently, no creature is immune to the strength drain effect.
Artifacts can have this as a random minor beneficial property:
While attuned to the artifact, you can’t be charmed or frightened.
Blackrazor which does not appear on your D&D Beyond Search
Fungal Body (level 14 Druid, Circle of Spores archetype)