I just hit submit on the same solution a bunch of times, and I got timing differences between 20ms and 56ms. This has become relatively common. I mostly write answers in Rust, but I noticed it recently in MySQL too.
Because of the inaccurate timings, I've taken to hitting submit multiple times and picking the lowest, since that's more likely to be the accurate timing.
If the reason the for the wide variance in timings is contention on the solution execution machines - whatever that infrastructure looks like, then we'll have entered a feedback loop of driving up contention further during periods of contention as users hit submit more times than they normally would. But I can only guess what's happening, as I don't know what leetcode looks like behind the website!
It's somewhat annoying as a user, and not great for LC either, as I use up more CPU time running solutions, and more rows in a DB somewhere storing all these extra submission results.