If so it is very buggy. I was just trying it about ten minutes ago and it definitely was not working with either ranged or melee attacks.
Yeah, one of the bugs if if a spell was the last hit on the enemy. So for a workaround I'll ensure that the hit before the rogue was a melee weapon.
There definitely are other drivers behind the bug, which makes it hard to pin-point all conditions. So usually I'm making sure the enemy has been hit with a melee weapon, or I'm able to use bonus action hide for Sneak Attack.