PSA: for anyone who is troubleshooting their Windows 11 randomly switching to light mode every time they try to change it back to dark mode, that’s a bug in PowerToys:
github.com/microsoft/PowerToys/issues/42386#issuecomment-3411381380
you need to disable a new feature called Light Switch which they accidentally enabled by default