When/where you set the parking brake shouldn't really matter, unless you want it to try to detect the gate. I've seen this happen sometimes. I've been refactoring internally a ton because the way I have the navigation internally is a little wonky and I'm seeing some weird behaviors like this.
I like the idea of having a "complete flight" button instead of trying to do it automatically, an extra click won't matter.