Detection in Skyrim is less about raw skill level and more about line of sight, lighting, and noise. At level 35 sneaking you've got the basics down, but there's a bunch of stuff that can tank your detection rating even when you think you're hidden.
The inconsistency you're seeing is probably a mix of: enemy positioning (some NPCs have wider vision cones than others), whether you're in shadow vs. lit areas, and if you've made any noise recently. Crouching doesn't silence footsteps perfectly - you still generate detection points when you move, especially on hard floors. That's why sometimes you can walk right past someone and other times they spot you from across the room. It's not random, but it feels random until you internalize the mechanics.
Invisibility potions are honestly not a waste early on, but they're more of an "oh crap" button than a core strategy. Save them for when you mess up or need to slip past something you can't handle. By the time your sneaking hits 50-60 and you grab the perks that boost your detection radius and muffle your movement, the potions become way less necessary.
What I'd focus on instead: grab the perk that lets you move faster while sneaking, and the one that reduces your detection radius (I think it's called Silence or something similar - the one that muffles your footsteps). Those two alone make stealth way more consistent. Also, abuse shadows. Seriously. Stay out of lit areas and enemies will miss you even at lower skill levels.
How are you doing on the Archery side? At 22 you might not have the perks yet that make your shots actually land reliably from distance.