There are different types of glofish. Do you know what type you have?
The most common type is a genetically engineered tiger barb. While its unusual for a tiger barb to outright kill another fish, they are more likely to if the other fish is sick. They will most certainly quickly consume a dead fish.
This could be an indication that your water parameters are not ideal. Do you know your water parameters?