\(\blacksquare \) in Mathematica Exp is a symbol. Head[Exp]
gives Symbol
but in Maple it is not.
In Maple
indets(z^2-exp(x^2-1)+1+Pi+Gamma*foo()-sin(y),'name');
gives \(\left \{ \Gamma ,\pi ,x,y,z\right \} \) but in Mathematica
expr=z^2-Exp[x^2-1]+1+Pi+Gamma*foo[]-Sin[y]; Cases[expr,_Symbol,Infinity]
gives \(\{e,x,\pi ,z,\text {Gamma},y\}\)
Notice that \(e\) shows up in Mathematica, but not in Maple.