That is not an issue because Paizo wisely recognized that in-combat hiding is too contingent on GM Fiat and wonky rulings so they changed sneak attack to not care about stealth exclusively, but includes all ways to trigger Off-Guard. (Which is how they buffed Rogue in 2024 with Vex Mastery btw)
You are skilled and opportunistic. Using your sharp wits and quick reactions, you take advantage of your opponents’ missteps and strike where it hurts most. You play a dangerous game, seeking thrills and testing your skills, and likely don’t care much for any laws that happen to get in your way...
2e.aonprd.com
Sneak Attack
When your enemy can't properly defend itself, you take advantage to deal extra damage. If you Strike a creature that has the
off-guard condition with an
agile or
finesse melee weapon, an agile or finesse unarmed attack, a ranged weapon attack, or a ranged
unarmed attack, you deal an extra 1d6 precision damage. For a ranged attack with a
thrown melee weapon, that weapon must also be agile or finesse.
One of the easiest way to achieve off-guard is just flanking.
View attachment 396884