Violent oscillation in position hold mode

Hey, I am using S500 frame, with Pixhawk4. I was flying in stabilized mode and i switched to HOLD mode and the drone started oscillating aggressively. i tried to change the Roll and Pitch gains, but there was no effect. Please help me out.