The "%var = value" syntax is indeed the same as "set %var value", you can see that using $eval:
//echo -a $eval(%var = 2)
However, /var declares a local variable but /set will only change the value of the variable, it won't make it global:
//var %test 5 | echo -a $var(%test,1).local | set %test 6 | echo -a $var(%test,0) -- $var(%test,1).local
/set only makes a variable global if it's not already declared as a local variable.