Okay, found it. It seems to be triggered by one of my scripts.
I'm using a custom script to mimic a different play/pause behavior.
Pause is essentially stop + move editor cursor to play cursor.
So, executing the SWS action, followed by a stop from this script, triggers that behavior.
Code:
function NoUndoPoint() end
playstate = reaper.GetPlayState() -- get play state of the transport
if playstate > 0 then -- when play state is greater 0 (play, pause, record)
reaper.Main_OnCommand(40434, 0) -- View: Move edit cursor to play cursor
reaper.Main_OnCommand(1016, 0) -- Transport: Stop
else
reaper.Main_OnCommand(1007, 0) -- Transport: Play
end
reaper.defer(NoUndoPoint)