unfortunately, it's gengar's new ability. I loved to use gengar, or watch other people use gengar. but then Game Freak had to change it's ability. the Levitate ability was soooo perfect for gengar. it got rid of it's Ground type weakness and gave it an edge in battle. now people can take out gengar no problem. now Cursed Body only gives it a minor edge in battle. with Cursed Body, the only advantage gengar will get is if someone hits it with a physical move and if gengar even survives the physical move and it's new ability activates. this new ability is a 50/50 shot, because there's only a slight chance that Cursed Body will activate.
So unfortunately, Cursed Body is gengar's new ability. it not a glitch.
So hope I helped