This weapon was initiated from an image I had of a trident passing through rays of sun spearing through a cave, appearing and disappearing as it passes between darkness and light. I think this one is workable in a real game - one advantage per turn if your characters are absolute gamers and much less if the enemies are smart. You could consider a trident is a suboptimal damage choice compared to others for the ranger.
---
Shadows drip from this weapon like thick heavy smoke, blending into darkness around it. Rangers of the Deep Lurker conclaves molded the trident from coalesced shadow collected in the deep aquatic nethers of the world where the boundaries between planes wear thin.
---
Shadow Trace
Weapon (trident), rare (requires attunement)
You have a +1 bonus to attack and damage rolls made with this magic weapon. While this weapon is in an area of dim light or darkness, you can use a bonus action to teleport it back into your hand.
Deep Traveler. While attuned to this weapon, you gain darkvision out to 120 feet if you don't have it already. While you wield this weapon underwater, you can use a bonus action to move in a straight line up to your speed in a direction of your choice. Once you use this bonus action, it can't be used again until the next midnight. If you are a ranger, you can add ocean depths to your list of favored terrain.
One With Shadows. When you start your turn in an area of dim light or darkness, this weapon becomes invisible to those not attuned to it. When you make an attack roll with this weapon while it is invisible this way and your target is also in an area of dim light or darkness, you are considered invisible to the target for purposes of the attack. The weapon then becomes visible. This property is suppressed for 1 minute if the weapon is exposed to bright light from a daylight spell or any sunlight.