Repeat Last Macro

How can I make this macro work in 10.2. (I have seen similar related posts before, but they did not use this approach

Am setting 2 variables lastMacroUUID and lastMacroName in any macro that should be run with this script (registering a repeatable macro)

tell application "Keyboard Maestro Engine"
	set lastMacroUUID to process tokens "%Variable%Global_LastMacroUUID%"
	set lastMacroName to process tokens "%Variable%Global_LastMacroName%"
	
	if lastMacroUUID is not "" then
		display notification "Repeating: " & lastMacroName with title "Keyboard Maestro"
		
		do script lastMacroUUID
	else
		display notification "No macro saved to repeat."
	end if
end tell

Is the script generating an error?

Is the UUID correct?

In your script you are getting the values of the variables Global_ LastMacroUUID and Global_ LastMacroName (apologies for the extra spaces, needed to force bold formatting), so make sure your KM variables also have that "Global_" prefix or remove it from your script.