I found the following adb shell command to force enable/disable dark mode. Could be useful for others who is looking the same. Disclaimer: I haven’t tried it yet.I went a step further and put a switch in that wire. My car has automatic headlights and i don't always want the screen to dim as it flicks on the headlights at dusk or dawn. My switch is set up that it only interrupts the wire but you could connect it in the way @surfer63 suggests and put a switch making it effectively a manual hardware switch for turning it on and off independant of your headlights.
Enable Dark Mode:
adb shell settings put secure ui_night_mode 2
Disable Dark Mode:
adb shell settings put secure ui_night_mode 1