We were setting up in loose desert sand and the stakes wouldn't stay put... I tied them to nearby rocks with some cord, which held everything firm all night. How do you handle bad ground for your tent?
Ugh, sandy sites are the worst for stakes. I've totally been there, watching my tent flap around like a sail. My go-to move is using extra guy lines and tying them off to whatever's solid, like bushes or big logs. Sometimes I'll even bury a stake sideways as a deadman anchor if there's nothing around. It takes more time but beats waking up to a collapsed tent. Your rock trick sounds smart, gotta remember that for next time.
Ever thought about not using stakes at all? In sand, I sometimes just weigh the corners down with my stuff... works in a pinch. Not perfect, but it's saved me a few times.
At Joshua Tree, I saw a ranger recommend filling stuff sacks with sand and tying them to the tent loops. That method has never failed me in loose soil.