Loot boxes have drawn rising regulatory attention because they resemble gambling and disproportionately affect young people.