Same here - have also tried this:
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', event => {
if (event.matches) {
handleLightsOff();
} else {
handleLightsOn();
}
});
Same problem - PWA needs to be closed and re-opened.