How to export midi and audio the same duration

I’m writing ensemble music with many fermatas, tempo changes, rall, accelerando etc.

I want to export midi and audio instruments for import into a DAW (Reaper in my case). But everything I try leaves the midi and audio tracks different lengths.

Searching the forums, I am led to believe it is possible to do this, maybe using a tempo track? AI chatters overconfidently give me some tips, but nothing that works.

Is there a resource that will help me through this? Is there a special way to set up the project? I’m using Dorico 6 Elements. I’ve noticed the same thing with Musescore.

Thanks

George