Quadcopter oscilate when in loiter mode but its fine in stablize and althold mode

Greetings

I have experience in fixed wing setups but this is my first quadcopter build.
The quadcopter flies well with the default settings. I take off in stabilize mode or alt hold mode with no problem other than slightly drifting from the wind force.
However as soon as I switch to loiter mode the quadcopter acts crazy trying to hold it position.
I tried lowering the P gain but the quadcopter became less stable when taking off.

i spent many hours trying to fix this issue. your help is greatly appreciated

I will upload the bin files here

set up:
f450 frame
sunnyski motor 2216 800 kv motor
30A escs
pixhawk 2.4.8 flight controller
3s 3300 mah battery
weight 1100 grams

That Flight Controller is not supported by Ardupilot.
Unsupported

sorry it is pixhawk 2.4.8

Oh really? I think that’s bullshit.

Even if it didn’t say Crossflight right in the messages there was never a V4.3.7.6 Arducopter.

Take your questions to Radiolink.

I have a new pixhawk. If I swap the flight controllers would you help me ?

If yes let me know and I’ll get back to you next week