OK, let me ask another way

Try either of these PowerShell commands, tested with a copy of Notepad that has some text entered, and not saved.

Get-Process -Name Notepad | Stop-Process -Force
Stop-Process -Name Notepad -Force

You could also script this to make it automated. Essentially the script would launch everything, then watch for one process to exist, and when it fails to exist, it closes down everything else.

For example, it would launch MSFS, then watch every few seconds for the existence of FlightSimulator.exe, and if it finds that process it does nothing. As soon as that disappears, then it stops all the other processes it launched.