Once again sorry if this is around but I didn't see it when looking. I run Flycast standalone outside of Retroarch. In order for escape to work for exiting games you will need to use the following auto hotkey script. Note: this is this is just a copy and paste from the M2 emulator script but figured if I can make life easier for someone looking around might as well. Cheers all!
; This section closes Sega Model 2 Emulator when pressing Escape
$Esc::
{
Process, Close, {{{StartupEXE}}}
}