Answer
The automated return may need substantial energy for climb and headwind flight. Set the operational reserve so RTH does not begin after that energy margin has already been spent.
Explanation
Automation cannot create energy. Its planned maneuver must fit the remaining battery margin.