Those sparks are drawn by your PC. But the server is the one that ultimately decides whether you hit or not.
Your PC can't wait for the server to tell you whether to render the sparks or not (delayed sparks would look weird), so it has to guess based on most recent info it has. Sometimes it guesses wrong.
That's just a technical limitation of online games with ping.
See this dev post: https://playvalorant.com/en-us/news/dev/the-state-of-hit-registration/