A couple of things could be happening:
– You’re getting scared, so back off the bike
– Your bike is accelerating away from you, so you end up behind it
You want your weight centred above the BB on the bike, so you need to pay attention to when you know you’re not centred, and rectify it.
If you find the bike in front of you, try to slow it down before entering the section, that way you’ve got time to think and adjust.
The reason why you don’t want to be off the back of the bike is that you’ll lose front end grip, which will make the bike feel skittish, which will make you scared and the whole loop repeats itself.
For me, the answer is practice and sessioning. Get your mates to film you, and shout when you’re off the back.