Calc, =SUBSTITUTE (...) results in error. Why ?

LibO 5.1.3.2

Cell A1 contains:

textstring(a)textstring

I want to replace “(a)” by “@”

Formula used in cell B1:

=SUBSTITUTE(A1,(a),@,1)

I am using comma as separators and created the formula with the wizard

Result:

#NAME?

which is “invalid name”

The string in A1 is text, verified by adding text “(a)@” using the formula:

=A1&"(a)@"

Result:

textstring(a)textstring(a)@

which is correct.

What is wrong? What do I need to do?

=SUBSTITUTE(A1,"(a)","@",1)