You answered the question in it'sits final sentence. You PRACTICE it.
If the piece keeps a constant tempo this won't be too hard. You just need ears, plus sufficient flute technique to be ABLE to play without hesitation.
If the tempo varies, you'll have to practice more! But it's perfectly possible. In the early days of multi-track recording (when 'multi' meant just two, or four if you were lucky) we didn't have tempo maps and click tracks. We recorded onone part then played the others with only our ears to guide the way. It could take several attempts!
There's a pop song which has about 20 seconds of solo vocal cadenza - you know, like 'I will always love you-u-u-u-u-u-u-u-u-u-u-u' only even more indulgent. I've heard untrained girl singers perform it to backing track and be ABSOLUTELY on the nail when the music re-starts. They've practised with the recording so much that they COULDN'T sing it any other speed!