MSFS2024: Not sending SimStop when leaving for the main menu

My flight logger simconnect code from MSFS2020 needing to detect the various ways a pilot might have completed a flight (including a sim CTD) took a bit of a nosedive on transition to MSFS2024 partly due to the differences in the ‘pause’ behaviour.

BUT searching this forum for clues and hints revealed there’s a well-established art of using the A:CAMERA STATE simvar as a proxy for where the use is interacting in the sim. It’s clearly not perfect but it’s a really useful additional piece of information. I’m shocked I’ve never noticed it before.