My santa cruz heckler ghost shifts from frame flex. Is there anything I can do? I just bought a 2013 heckler used and found that it ghost shifts under heavy pedaling. I weight 230 so I am probably putting more pressure than average. But this only happens when I have smallest cog in front and largest and 2nd largest in back, fairly common gear ratios for a MTB.

My shifter cable housing runs all the way through to the derailleur and my LBS just changed the cassette and chain. I can physically see my rear wheel shift slightly off center when I apply a lot of pressure to my pedal while keeping the brakes on. I think this is the root cause, but don't know what to actually do about it. I don't think there's any damage to the rear triangle that I can see. 



I'm also wondering if a bent hangar could play a role. I had a branch jam up in my hanger and it ripped it off and snapped the little metal hanger attachment. But I really think the derailment is coming from the top vs from the bottom. As in, I've caught the bike mid skip, and you can see the chain where it leaves the derailleur is in the correct spot, but above it the chain is 3-4 cogs below where it should be. 

Any help is appreciated. This issue is sullying an otherwise amazing bike.
Given that the cassette is tied to the axle, if the alignment is changing, you have a few possible causes:


Freewheel is worn out and has a significant wobble
The pivot where the chainstay and frame connect is worn and loose
Axle itself is loose, either through the hub, or at the dropouts


When applying pressure to the pedal with the brake on, it will naturally pull the alignment of the axle so that drive side is further forward than the non-drive side.  You also mentioned that the whole wheel moves, so I would lean towards a pivot or axle problem.