I dealt with this a few times, and the theory I had was the following:
You need to compute what would be the ideal angle you want your plane to be. Usually, you want to get rid of roll (rotation around Z). Then, take the current angle, compute the difference, and apply it as a torque force. Over multiple frames, this should end up stabilizing the plane closer and closer to its ideal angle. You can also customize how strong that force is by multiplying it by some factor.
When I say "angle" here, it can either be a single axis, or the whole rotation (through a quaternion). There are multiple ways to do it, each with their own results.
In my project I used
RigidBody so I called
add_torque(): https://docs.godotengine.org/en/3.1/classes/class_physicsdirectbodystate.html#class-physicsdirectbodystate-method-add-torque, which adds an angular force to the body.
I can't share this code here, but I have an old, more simplistic version of it online which had the feature: https://github.com/Zylann/godot_flyer_test/blob/master/flyer.gd#L30 (although it doesnt use physics at all and loopings dont work due to gimbal lock).
I'm not sure what it would be for
Another approach is to fake it entirely so it's only a visual trick applied locally just on the mesh and the camera ;)