I sometimes check the event list when this happens (and it does, regularly, I just don't bother posting about it), is sometimes throws up that there is a rogue controller event somewhere. Doesn't always fix the issues.
And, more often than not, it happens on projects that have been shortened, even though I have checked that nothing at all, including automation, occurs after the project end.
It's a pity we don't have an option to stop playing at a particular marker... That would work.
But I'm not complaining, as such, just saying that the "problem" is still around, for some of us. Generally speaking, when I export a project to audio, all is okay.