B is equivalent; A is not.
Let’s write out the math.
A
$$
\log(\mathbb E[y]) = \beta_0+\beta_1x_1+\beta_2x_2\\\iff
\mathbb E[y]=e^{\beta_0+\beta_1x_1+\beta_2x_2}
$$
B
$$
\mathbb E[\log(y)]=\beta_0+\beta_1x_1+\beta_2x_2
$$
B certainly looks like it is equivalent, especially considering that the estimation specified by your code will be minimization of square loss (same as in OLS, equivalent to Gaussian maximum likelihood estimation).
By the strong form of Jensen’s inequality, $\log(\mathbb E[y])<\mathbb E[\log(y)]$ with strict inequality, so the two are not equivalent to each other, ruling out the possibility that A is also equivalent to the lm specification.
Overall, B is equivalent to the lm specification while A is not.
gaussianonly has 2 s's. $\endgroup$