Yes, that's expected; most algorithms will only do 'one step at a time'. If you want to apply the substitution for all matches in one shot, use the repeat=True
flag, so
a:= k_i k_i k_{\beta} k_{\beta};
N:= k_i k_i = 1;
substitute(a,N, repeat=True);
An alternative is to use a converge
block, though for this example that's overkill. In essence, a converge
block will apply a series of instructions until the expression no longer changes. For your case,
a:= k_i k_i k_{\beta} k_{\beta};
N:= k_i k_i = 1;
converge(a):
substitute(a,N)
;
Both of these will produce the intended '1' as result.