I have to assume that you used stainless spikes, although steel will also lift under the right circumstances.
Clinching the longer spikes under the tie is the best solution but not always practical especially on a trestle
where your laying ties over stringersl.
I don't think glue of any sort would be a practical solution but that is just opinion not experience speaking.
I will say that, I have had hand spiked aluminum rail on Redwood ties on the ground for over ten years and
after I replaced all the stainless steel spikes with steel (the first year) I have had no problems of any great extent.
A few spikes will still lift but none have rusted away or show any indication of doing so.
How long are steel spikes supposed to last? Probably depends a lot on your climate, and the size of the original spike.
What is ten years in 1:20 scale???? How often did the prototype replace ties and spikes???
Since the pointed end of the spike in the tie is probably what is being forced up as Greg suggests, and you dont have room/clearence to bend the ends of the longer spikes over under the ties, what about using the longer spikes to go through the tie and nipping off what sticks out on the bottom?
Haven't tried it, but just a thought since it eleminates the pointy end of the spike...