That is not the legal definition of gambling, and all court decisions on the subject clearly indicate that gambling requires real cash value to the prizes and not just entertainment that has no actual value.
Loot boxes do not have the 3rd element of gambling, which is the recognized legal definition in virtually every jurisdiction.
https://www.truthfinder.com/glossary/gambling-definition/
"In order for the activity to be considered gambling, it must contain three separate elements. These are consideration, chance, and a prize. If one or more of these elements is not present, then gambling is not taking place."
"The final element of gambling is the prize. If the player has the chance to win something of value, then gambling is taking place. Again, the amount or value of the prize is inconsequential. As long as it has some value, it is considered gambling."