Clearly, at some point, James Gunn was made aware of the decision, and he certainly would have known what was going on before he made the decision to return to complete his trilogy, but one would have thought that if there were hopes to make a third Guardians movie with Gunn back when the script for Infinity War was being written, Gunn would have been brought into the conversation.
James Gunn has written and directed both of the Guardians of the Galaxy movies thus far and he’s currently working on the script for a third.