Same thing happens with boost orbs on almost every beetle trial, it might be because the event and time trial variations are basically copy-pasted on top of each other, and the event's expiration doesn't seem to discriminate between which one it is but removes all of them in one fell swoop. I think it's been a thing since the first roller beetle race events came out in 2018, some frequent racers settle for waiting out the event or joining it not to race in it, but just to see when the event timer expires, though it can get annoying and disrupt the flow of your practice. In the worst case something like this might occur right on your best run yet, that happens often too. Alas, there are a bunch of similar minor inconveniences that avert the average person's eyes, no small thanks to pseudo-anonymous leaderboards in a minigame centered around ranking and leaderboards. Most people would chalk these things up to their skill level or simple bad luck and call it a day, when really it's neither of those two.