When changing back from gimbal control to gain control using X2, something can go wrong with the MR control system but only in RTH causing oscillations.
UAVProducts seems to know about this and how to fix it.
The fix is to return the Basic and Attitude gains control from X2 to INH, i.e...