Store selected actions in a KM variable?

tell application "Keyboard Maestro"
	-- save the current selection
	set theSelection to the selection

	-- do other stuff, including changing the selected Actions

	-- restore your saved selection
	set the selection to theSelection
end tell

...should do what you want.