For gliders with electric motors (switch on off), the FBWA mode is usually used.
Now it should be the case that when the motor is ON, you specify a climb angle of e.g. 30 degrees and when the motor is OFF, a climb angle of 0 degrees.
Can this be achieved with ARDUPILOT PLANE, with the many parameters?
IMO, not in FBWA.
You would have to work around by using a different mode, maybe CRUISE for it.
CRUISE works with climb / descent requests and auto throttles, e.g. you would set the cruise throttle to 0%.
You may need an airspeed sensor to be able to use the TECS_SPDWEIGHT=0 for gliders.
It is a very theoretical construct, I have to admit.