I've seen others run into this bug too, but I still don't fully understand it. Looking at the code, there's nothing that should send the player back to the main menu or into free roam at that point. I've tried multiple times to replicate the issue myself, but no luck so far.
My theory is that Ren'Py might be using some older or cached code that's causing these unexpected behaviors. Right after the Sadie scene, the logic is straightforward: if you have enough points with Tracy, it jumps to her scene, if not, it moves on to the next one. The part where it suddenly jumps to free roam is the most confusing, because that really shouldn't happen based on the current code.
I've since upgraded to the most recent version of Ren'Py, so hopefully that resolves any compilation issues like this.