Running an NX drive train, 11-50 cassette. Bike is just shy of a year old, been shifting like a dream until recently a little sluggish shifting up the cassette. Had the bike in the stand the other day, couple clicks on the barrel adjuster solved my sluggish shifting. Next ride my chain jumped the 11 tooth cog on an up shift and jammed between the frame and cassette (first scratching the frame, bummer). Threw bike back in stand, everything looks aligned, hanger looks okay, checked limit screw, turned in until it was making noise, then backed off to silent, went out to ride today, jumped the cog again. Its not consistent which is weird as well. I can shift 2-3 gears up and it locked in fine..
Put your bike back in the bike stand, see if you can re-create what is happening while your looking at the rear end. May be obvious what the problem is while watching.
Remove chain and line up top jockey wheel and 11 tooth cog visually.
Is the chain length ok? Maybe stiff links? Too long and it will be slack, droop on the bottom and your rear mech won't have any tension in highest gear which could cause the chain to jump off.
Check your B-tension screw, I had it a few times now that the screw moved in and the b-tension was off.
The derailleur hanger has to be straight- for me this is the main culprit. It might look fine but can still be off. The Eagle is very sensitive. Buy an derailleur hanger alignment tool or got to a bike shop.