Just in case anyone ends up here…
Unchecking Quit On Go Back works but if you still want to quit the app when pressing back when on the main screen this is what worked for me (C#):
public override void _Ready()
{
GetTree().Root.GoBackRequested += OnBackMobile;
}
...
private void OnBackMobile()
{
if (!Engine.HasSingleton("AndroidRuntime")) { return; }
var android = Engine.GetSingleton("AndroidRuntime");
if (android != null)
{
var activity = android.Call("getActivity").AsGodotObject();
activity?.Call("moveTaskToBack", true);
}
}