If you want to keep the play cursor at the current position, you can use for instance,
Transport: Play/pause instead of
Transport: Play/stop.
In case you want to make a toggle Action, have a look at using Cycle Actions:
https://forum.cockos.com/showthread.php?t=209529
Otherwise how does your Custom Action currently look like?