First you need to make sure that your Airspeed UAVO is set up and working right.
Then the "correct" way would be do tweak the Altitude PID. If a PID is oscillating, a quick fix is to reduce the numbers (say multiply P, I, (and D) all by 0.66). The long way is to tune the PID however you know to do that.
The Altitude PID version is either in the pathfollower version you are using (I guess this auto-switches and re-inits correctly?) or is in an external Altitude* UAVO. Generally, the *PF settings are used when the PF is being used, but IIRC there is one case where the *PF setting is completely ignored and not ever used?
IIRC you can disable the use of airspeed and it will try to fly with a fixed angle of attack, must be slightly up where adding power makes it climb. Airplane probably needs to be a bit nose heavy...
Be aware that in the FWPF, the vertical/thrust algorithm is "if too low, increase thrust" and "if too slow, push elevator down". It is done this way for safety on engine failure instead of needing special code to keep it from pulling up and stalling on engine failure. I think the main FWPF altitude setting is VerticalPosP, but then there are several other settings such as PowerPI. SpeedPI, and *CrossFeed that I have not played with and probably all interact. Finally, there are Safety* and if these are disobeyed, your waypoint flight will go to "error destination" rather than next waypoint. Try to understand these and set the limits to good values. The way to avoid this for waypoints is to to set error destination to -1.
It would be great if someone would write up a complete FWPF tuning guide, but I suspect that there are a lot of things there that you should just leave alone, like the EKF settings.
Be aware that there seem to be some issues with flying wings and FWPF.
Karla, JDL, and I discussed FWPF altitude tuning (some guessing and testing) and flying wings here IIRC:
https://forum.librepilot.org/index.php?topic=4769.0https://forum.librepilot.org/index.php?topic=3518.0