The new "Store Selection" uses the same command ID as the old "Set Selection".
My guess is that MAXON has simply renamed and reimplemented the old command with the new behaviour.
I have provided here a script which mimics the old behaviour.
Have not tested on S24 or above.
Enjoy!
Set Selection (legacy).zip