When my plane accelerates, it gains altitude

I set it up according to the tutorial, but as long as the aircraft accelerates, it will definitely increase its altitude. When the altitude exceeds the threshold when flying far enough, ekf ​​will report an error. I don’t know where the problem lies?I have changed many parameters but cannot improve this problem. Please help me.

5 inch
2100kv 2004
BLHeli_32 40a
Wheelbase 250mm