Dark mode is actually bad for your eyes as it causes more strain. Reading white letters on a black back ground is harder than reading black letters on a white background.
F.lux and similar software are a better alternative as they just increase the warmth of the screen, which, at least for me, eliminates that feeling of eye pain when computing at night.