The Gloom Stalker ranger's Umbral Sight feature, which is granted when a ranger chooses the Gloom Stalker archetype at level 3, states:
You are also adept at evading creatures that rely on darkvision. While in darkness, you are invisible to any creature that relies on darkvision to see you in that darkness.
Source: Xanathar's Guide to Everything, p. 42
I read this as saying that as long as the ranger remains in darkness, the ranger remains indefinitely invisible to all creatures that would otherwise be able to see the ranger with darkvision. Even attacking or casting a spell, which normally causes an invisibility effect to end early, would not cause it to end in this situation. A Gloom Stalker ranger could attack repeatedly from melee range, without ever moving to a different spot, and still remain unseen. Only a creature with a special sense such as truesight or blindsight would be able to see the ranger, as long as the ranger remains in darkness.
Is this interpretation correct?