Classical effective action of dilaton gravity and the double copy