I think you can do it in two steps. First, geometry optimization for bulk GaN, and then surface calculation with electrode and its extension constrained as Fixed. In this calculation, pseudo-hydrogen atoms with fractional charges, which are used to passivate the GaN surface, may and probably should be constrained as Rigid, not Fixed.