PIDs and stability problem

Hello everyone,

I come to you because I have a strange problem with a drone. I have some difficulties tuning the PIDs and I have observed a strange behavior of the drone in flight When I set up the PIDs correctly and I restart the drone, it oscillates as if the PIDs were wrong and I have to connect the Pixhawk to QGroundControl, go to “Tuning”, “advanced”, change the PIDs and then restore the “right” ones by clicking on “Restore from keyboard”.
But the most interesting thing is, if I take off with oscillations and have the drone in flight for few seconds, it magically and rather suddenly stabilizes itself.

I am using a drone with a 3DR Pixhawk Mini and the firmware installed on it is PX4 v1.11.
Here is a link to view the logs related to on of the flights:
https://review.px4.io/plot_app?log=2861552b-f5e3-4910-b754-f5f3b558daa0

Could you help me please???
Thank you!