(Edit: first version was about lcm rather than gcd). Take $R=k[u,v,w]$, $a=uv$, $b=vw$. Then $gcd_R(a,b)=v$ (times constant). Now let $S=k[a,b]$. Since $a$ and $b$ are independent, $gcd_S(a,b)=1$ (times constant). Right?

Edit: here's an even simpler example: $R=k[u,v]$, $a=u$, $b=uv$, $S=k[a,b]$. Then $a|b$ in $R$, but $a$ and $b$ are both irreducible in $S$.

2 changed example with lcm to gcd

Reality check

(am I seeing things?): Edit: first version was about lcm rather than gcd). Take $R=k[u,v,w]$, $a=uv$, $b=vw$. Then $gcd_R(a,b)=uvw$ gcd_R(a,b)=v$(times constant). Now let$S=k[a,b]$. Since$a$and$b$are independent,$gcd_S(a,b)=ab=uv^2w$gcd_S(a,b)=1$ (times constant). Right?

1

Reality check (am I seeing things?): Take $R=k[u,v,w]$, $a=uv$, $b=vw$. Then $gcd_R(a,b)=uvw$ (times constant). Now let $S=k[a,b]$. Since $a$ and $b$ are independent, $gcd_S(a,b)=ab=uv^2w$ (times constant). Right?