I don’t think the examples you mentioned are GMPC’s.
I think they are very good examples of how to run long term NPCs.
The characters you describe have motivations beyond “one of the party”. They operate with the party when motivations align, but also leave when motivations diverge. They are...