A counterexample: $f(x,y):=x^2y^2$ if $xy\ne0$ and $f(x,y):=|x|+|y|$ otherwise. --- The OP has changed the question to additionally require that $f$ be smooth. Here is a smooth counterexample: $f(x,y):=x^2y^2+(x^2+y^2)e^{-x^2y^2(x^2+y^2)}$.