I believe this is by design. RetroArch saves to sram when the program exits, so to make your save really stick, you’ll need to exit the emulator cleanly rather than leaving it running in the background. Savestates should save immediately, though, so that might be a better solution for you if you don’t want to change your workflow.
Anyone can chime in here and correct me if I’m wrong.