According to the source code file
frameworks/base/core/java/android/provider/Settings.java
there is a global setting in the user profile called battery_saver_constants, which can hold several comma separated parameters. These parameters are applied when battery saver is on. Here's the list:
/**
* Battery Saver specific settings
* This is encoded as a key=value list, separated by commas. Ex:
*
* "vibration_disabled=true,adjust_brightness_factor=0.5"
*
* The following keys are supported:
*
* <pre>
* advertise_is_enabled (boolean)
* datasaver_disabled (boolean)
* enable_night_mode (boolean)
* launch_boost_disabled (boolean)
* vibration_disabled (boolean)
* animation_disabled (boolean)
* soundtrigger_disabled (boolean)
* fullbackup_deferred (boolean)
* keyvaluebackup_deferred (boolean)
* firewall_disabled (boolean)
* gps_mode (int)
* adjust_brightness_disabled (boolean)
* adjust_brightness_factor (float)
* force_all_apps_standby (boolean)
* force_background_check (boolean)
* optional_sensors_disabled (boolean)
* aod_disabled (boolean)
* quick_doze_enabled (boolean)
* </pre>
* @hide
* @see com.android.server.power.batterysaver.BatterySaverPolicy
*/
On recent Android's, the global settings configuration file has XML format and is located here
/data/system/users/0/settings_global.xml
So you can add this new parameter called battery_saver_constants with its value enable_night_mode=false like this:
<setting id="9999" name="battery_saver_constants" value="enable_night_mode=false" defaultValue="enable_night_mode=false" package="android" defaultSysSet="true" />
Notice the id parameter, it can be any number but should be unique in this configuration file.
P.S. You need root to edit this file.