Failure mechanism of AlN nanocaps used to protect rare earth-implanted GaN during high temperature annealing