Ah, so if we were to manually create that file, say as part of a “Safe Mode” script, we could force the sim to launch in safe mode. If the sim removes that file automatically for a clean shut down from Safe Mode, we wouldn’t need to script its removal either.
Checking another post, this file should be in the “LocalState” folder. So in theory this should work.
copy nul > C:\Users\%USERNAME%\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\running.lock