I recently blew up my derailleur and didn’t even feel the impact and the hanger was just fine. The derailleur took the brunt of the impact, not the hanger. That can happen. So I’m not sure if this is answering your question, but it seems obvious for one that you are hitting something on the trail and not feeling it. Two, it is a 2017 bike. Are you fairly new to the bike? Or are you riding some new and rougher trail(s)? Is it 1×12 system? The rear mech of the 1x12s is quite long and does more readily take on impacts. BTW, Foxy r … … nice bike. =)
It could definitely be the hanger–the tolerances are really tight on drivetrains these days with all the extra gears on the cassette, and even if the hanger is only slightly–even imperceptibly–bent, it can cause problems at the limits.
It could also be the L limit adjustment on your derailleur. Usually if the L limit screw is out of position, you’ll find your chain skipping off the top of the cassette and into your spokes. However, this can also cause the bottom of the derailleur to get too close to the spokes.
Finally, your derailleur pulley assembly might be bent. I know you said it was a new derailleur, but maybe the pulley assembly got damaged or even arrived that way?
Check the hanger. I have gotten them new and bent out of the bag. don’t know if I would change the derailleur yet. check the hanger then the adjustments in the rear. I run gx on my Farley and it had to come apart before it didn’t work. Sounds more like the hanger and or the pulley cage. good luck.
I would have your LBS use the derailleur hanger alignment tool to verify that your hanger is straight vs just seeing if it is flat. The 3(ish) feet of extension that comes off that tool really shows the most minor of bends in the hanger.