As per the original paper on xgboost, the best split at a node is found by maximising the quantity below
$ \cal{L}_{\rm split} = \frac{1}{2} \sum \left [ \frac{G_L}{H_L + \lambda} + \frac{G_R}{H_R + \lambda} - \frac{G_I}{H_I + \lambda} \right ] - \gamma $
There exists a gamma parameter in xgboost package; assuming it is referring to the same parameter as in the equation, why would it impact the choice of the split if its value does not change?