if this were a bug report based on showdown mechanics, it goes in this thread. the thread here is for bugs related to the smogon pokedex.More testing needed, but it looks like Sandy Shocks is incorrectly unaffected by Stun Spore. You can see this on turn 9 of this replay.
https://replay.pokemonshowdown.com/gen9monotype-1778211676
I haven't posted on these forums in a long time and I'm looking for a bug report place and this is the closest I've found. Sorry if I overlooked a more appropriate place to share this.
as for this game, sandy shocks doesn't have immunity to powder moves (which appears to be what you're reporting). as of generation 6, electric types can't be paralyzed, which is why stun spore fails.