change tempo within timelined project

Hi,

I was wondering if there is a best practice for a project that changes tempo while playing.
The problem that I’m facing is, that if I change the bpm with a script during playback, then naturally also the beat position jumps.

Lets say i am playing a at 120 bpm changing to 180bpm. then all of a sudden in my beat-timeline i am in a time where i have already been previously, as the whole beat-timeline is then calculated with the new tempo with no regard to the first part that has been played at a slower tempo…

any workaround for this?

thanks